STAD29 / STA 1007 assignment 1

Hand in the indicated questions. In preparation for the questions you hand in, it is worth your while to work through (or at least read through) the other questions as well. What you hand in needs to include (i) your code, (ii) the output that your code produced and (iii) your comments on the output as asked for in the questions. The easiest way to get this is to use an R Notebook and preview the results (to HTML or Word or PDF) when you are done. Hand in your work on Quercus. If you did STAC32 last fall, it’s the same procedure. A reminder is here: https://www.utsc.utoronto.ca/~butler/c32/quercus1.nb.html You are reminded that work handed in with your name on it must be entirely your own work. It is as if you have signed your name under it. If it was done wholly or partly by someone else, you have committed an academic offence, and you can expect to be asked to explain yourself. The same applies if you allow someone else to copy your work. The grader will be watching out for assignments that look suspiciously similar to each other (or to my solutions). Besides which, if you do not do your own assignments, you will do badly on the exams, because the struggle to figure things out for yourself is an important part of the learning process. Before you start, you’ll need this: library(tidyverse) ## — Attaching packages ———————————- tidyverse 1.2.1 — ## v ggplot2 3.1.0 v purrr 0.2.5 ## v tibble 1.4.2 v dplyr 0.7.8 ## v tidyr 0.8.1 v stringr 1.3.1 ## v readr 1.1.1 v forcats 0.3.0 ## — Conflicts ————————————- tidyverse_conflicts() — ## x dplyr::filter() masks stats::filter() ## x dplyr::lag() masks stats::lag() 1. Work through, or at least read, problems 13.12, 13.13, 13.14, and 13.18 in PASIAS: http://ritsokiguess. site/pasias/ 2. At a certain small college, students take a test when they first enrol. Do the results of this test help to predict a student’s first-year grade point average? Some data was collected, in http://www.utsc. utoronto.ca/~butler/d29/grade-point-average.txt. There are two columns: first-year GPA and the score on the test. (a) (2 marks) Read in the data and display (the first ten lines of) what you have. (b) (3 marks) Draw a suitable plot of the data. Describe briefly what you see. (c) (2 marks) Fit a regression predicting first-year GPA from the test score, and display the results. (d) (2 marks) Is there a significant relationship between test score and first-year GPA? Does this surprise you, given what you saw in your graph? Explain briefly. (e) (3 marks) Obtain confidence intervals for the mean first-year GPA for students that have test scores 20 and 25.

 

(f) (2 marks) Which of your two confidence intervals is longer? Explain briefly why that is not surprising. 3. Work through, or at least read, chapter 16 of PASIAS. 4. Coronary heart disease affects many people. Is there an association between a person having significant evidence of coronary heart disease and the person’s age? 100 subjects were selected to participate in a study. For each person these four things were recorded: • an ID for that person (which we ignore) • the person’s actual age, to the nearest year • the “age group” in which the person falls • whether the person has “significant evidence of coronary heart disease” (“Yes”) or not (“No”). The data are at http://www.utsc.utoronto.ca/~butler/d29/chdage.csv as a CSV file. (a) (2 marks) Read in and display (at least some of) the data. To make the next part easier, call your data frame heart. (b) (2 marks) I wanted to have you plot the proportion of people in each age group that have significant symptoms against age group. This turns out to be a bit fiddly, but this code does it. Replace the initial data frame with whatever name you gave to the data frame you read in from the file (if you called it something different): heart %>% group_by(agegrp, chd) %>% summarize(n=n()) %>% spread(chd,n) %>% mutate(proportion=Yes/(Yes+No)) %>% ggplot(aes(x=agegrp, y=proportion))+geom_col() Run this code (by typing it or copy-pasting it). What does your graph tell you about how the likelihood of having symptoms depends on age? Explain briefly. (c) (2 marks) Fit a logistic regression predicting presence or absence of coronary heart disease from the (actual) age. Use the data frame you read in from the file, and display the results. (d) (3 marks) Is there a significant association between age and presence of significant symptoms of coronary heart disease? If there is, what kind of relationship is it? Explain briefly but carefully, using the output from this part only. (e) (3 marks) An alternative format for the same data is in http://www.utsc.utoronto.ca/~butler/ d29/chdage2.csv. Read the data

#STAD29 #STA #assignment

Share This Post

Email
WhatsApp
Facebook
Twitter
LinkedIn
Pinterest
Reddit

Order a Similar Paper and get 15% Discount on your First Order

Related Questions

Week 10 Assignment – Final Reflection Introduction I chose the

Week 10 Assignment – Final Reflection Introduction I chose the Death Penalty policy  This assignment builds off the Policy You Would Change activity you completed in Week 9. Instructions In a 2-3 page paper include the following three parts: Part 1:What is one domestic policy that you would change? Why?

Research legislation that has occurred within the last 5 years at the state or federal level as a result of nurse advocacy. Describe the legislation and what was accomplished. What additional steps ne Nursing Assignment Help

Research legislation that has occurred within the last 5 years at the state or federal level as a result of nurse advocacy. Describe the legislation and what was accomplished. What additional steps need to be taken to continue advocacy for this issue? Expert Solution Preview Introduction: Advocacy plays a crucial

Explore the difference between the following: Medicare, Medicaid, and a

  Explore the difference between the following: Medicare, Medicaid, and a private insurance of your choice (such as Major Medical, PPO or HMO): Respond to the list of questions below for each, supporting your answers with resources appropriate to the topic 1. Describe how this insurance is paid for? Who

Instructions Surfactants are an important class of compounds. As described

Surfactants are an important class of compounds. As described in the textbook, surfactants are most commonly used in soap and detergent. They are also used in many other situations where hydrophobic and hydrophilic ingredients must be combined, but they are often called emulsifiers in these cases. Examples can be found

https://www.mediafire.com/file/ul9jq96ctykprup/Care_Plan_1_.docx/file https://www.mediafire.com/file/5a0w1jrmztjy82k/Care_Plan_2_.docx/file https://www.mediafire.com/file/ul9jq96ctykprup/Care_Plan_1_. Nursing Assignment Help

Expert Solution Preview Introduction: As a medical professor, my role encompasses designing college assignments and providing answers for medical college students. Additionally, I am responsible for conducting lectures, evaluating student performance, and delivering feedback through examinations and assignments. With a focus on enhancing students’ knowledge and skills, I strive to

Creating a project charter document

earning Connection: This assignment is directly linked to the following key learning outcomes from the course syllabus: Using real world examples of projects, demonstrate an ability to manage critical components of the Initiating process group by: a. Creating a project charter document b. Preparing a scope statement c. Evaluating why

I would like to see a detailed Leadership Vision Board

   I would like to see a       detailed Leadership Vision Board reflecting your Vision, Mission, Values       as a Leader 10 years from today. You can use all words, all pictures or a       combination of words and pictures on your Board. You can do this by       cutting out pictures from magazines

Foundation Society and Culture

Essay Structure 1200 word essay, with a minimum of 1,000 words. It is important to ensure your work is within range. Words exceeding the word count will not receive credit. For example, if the introduction and methodology are very long and the method and data collection is not reached by

In one of your information-gathering lunches with Informational Systems staff,

  In one of your information-gathering lunches with Informational Systems staff, you encounter an issue that you have seen while working with other organizations: communication. One individual complains about the daily mountain of emails she receives, with roughly half having nothing to do with her job. Another employee calls out

Discussion 3 Did you know you were paying so much

Discussion 3 Did you know you were paying so much for bottled water? Gasoline is now around $4.50 per gallon, but water (in that 16oz size) is $8.00 per gallon. And, I have even seen people take their fancy bottles and pay a quarter to some shopkeepers for a refill.

Scientists Are Teaching the Body to Accept New Organs

Paper details https://www.nytimes.com/2019/01/22/health/organ-transplants-immune-system.html Introduction/Rationale: Being able to analyze information given to us is a critical and most vital skill in an age where information is being spread irresponsibly with the touch of a button. It’s easy to click “like” or “share” something if we feel that it supports our own

I. Classify the firm into one of the four basic

 I. Classify the firm into one of the four basic market models      A. Select a company from a current business periodical or where you work, and state which market model is represented by this company. Explain your reasoning using a narrative format. (Refer to CHART in Work Book

Given what you read in the required article this week

 Given what you read in the required article this week and what you learned from the positions presented by your colleagues in the discussion topic, complete a journal assignment that answers the following questions: (a) For organizational change to be successful, what role should a leader take in vision development? (b)

You will prepare a short paper about a current news

You will prepare a short paper about a current news article/storyrelating to the juvenile justice system. The story must be taken from the news on the week that the student is submitting it. The paper should be 2 pages in length, double-spaced. The paper must be in your own words.

Many fad diets claim we should eliminate dietary carbohydrate in

Many fad diets claim we should eliminate dietary carbohydrate in order to lose weight. The truth is that calories from all sources need to be managed for weight control. For this discussion, read the following article in full: Rodriguez, D. (2017, September 05). Good vs. Bad Carbohydrates. Everyday HealthRetrieved March 07, 2018, from https://www.everydayhealth.com/diet-nutrition/diet/good-carbs-bad-carbs/  Next

Communications Lesson Plan

 Develop a lesson plan for a specific communication setting (intercultural communication, small group, or interpersonal. Choose a specific concept related to one of these areas and do the following: Write two objectives based on what students/trainees should know as a result of your lesson. Use three sources to develop the

Extend Sabrina and Sable responses with additional examples about objectivity

Extend Sabrina and Sable responses with additional examples about objectivity in science. What ideas did your peers present that you had not considered before. Sabrina post I do not believe scientists and researchers can ever be fully objective during their work.  Each person comes in with a different viewpoint, different

Summarize (focus on experiment 1): Pickel, K.L. (2009). The weapon

For this paper, you will have to re-read and then summarize (focus on experiment 1): Pickel, K.L. (2009). The weapon focus effect on memory for female and male perpetrators. Memory, 17(6), 664-678. The summary must include: * an introduction * the researcher’s hypothesis * a description of the methodology (including