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

discuss 150 words apa references Global Health Issues, Policy, and

discuss 150 words apa references   Global Health Issues, Policy, and Healthcare Delivery The infant mortality rate in India is estimated to be 27 deaths per 1,000 live births (Bhatia et al., 2019). In contrast, China has fewer infant mortality rates than India, with only 9.04 deaths per 1,000 live

Film Aesthetics (Sections A / AA) : Psycho films

For this assignment you will write a paper of 1000-1250 words in answer to the topic listed below. The topic questions must be answered by way of formal analysis. Full evaluation criteria are listed at the end of these instructions. Papers must be typed in 12-point Times New Roman font,

help with ppt presentation on asthma Nursing Assignment Help

I need help with a powerpoint presentation on Asthma for Advanced Nurse Practitioners   Expert Solution Preview Introduction: As a medical professor responsible for creating college assignments and providing educational materials to medical college students, I understand the importance of delivering comprehensive and informative lectures to students. One particular request

Description of Project: The students can utilize their personal situation

 Description of Project:  The students can utilize their personal situation or a family member, business associate, etc.  The primary goal is to develop a plan encompassing the following topics.   First, develop a monthly budget tracking expenses over one to two months.  Compare the monthly expenses to monthly income and

Select a real homicide case in which a firearm was

Select a real homicide case in which a firearm was used to commit the crime and forensic examinations of  evidence related to firearms (cartridge casings, bullets, GSR, etc.) were utilized to assist in determining “what” happened. First, summarize the case, then explain in detail the role forensic firearm examinations had

Discuss the strategies for maintaining a healthy work environment; the

  Discuss the strategies for maintaining a healthy work environment; the legal implications of workplace violence and the responsibilities from organizations in providing a healthy work environment Review the ANA Bill of Rights (LOOK IT UP ON GOOGLE) and discuss how it protects nurses.IF YOU DO NOT FIND THE INFO,

When politics and medical science intersect, there can be much

 When politics and medical science intersect, there can be much debate. Sometimes anecdotes or hearsay are misused as evidence to support a particular point. Despite these and other challenges, however, evidence-based approaches are increasingly used to inform health policy decision-making regarding causes of disease, intervention strategies, and issues impacting society.

Since Hitler’s early attempt by selective breeding to produce children

  Since Hitler’s early attempt by selective breeding to produce children with certain characteristics. The science of Infertility has developed beyond belief in the last 20 years.     … How do you react to this new branch of genetic knowledge to produce children? Is there any real difference between this

Must at least three and a half pages long (could

Must at least three and a half pages long (could be more). Dedicate at least one page to each assigned chapter (chapter 8 and 10), and at least one page for your reaction/reflections. include a summary of each assigned chapter and your personal reaction/reflections. You may address the following: How

Police chiefs – Premium Paper Help

Premium Paper Help is a professional writing service that provides original papers. Our products include academic papers of varying complexity and other personalized services, along with research materials for assistance purposes only. All the materials from our website should be used with proper references.

Trauma Psychology – Premium Paper Help

Premium Paper Help is a professional writing service that provides original papers. Our products include academic papers of varying complexity and other personalized services, along with research materials for assistance purposes only. All the materials from our website should be used with proper references.

Critically assessing the legal effects of this doctrine once a company

Need a 2000 word essay critically assessing the legal effects of this doctrine once a company (it does not matter whether it is LTD or PLC) has been formally incorporated. The fundamental concept of the doctrine of Corporate Legal Personality (corporate separate personality) recognises that a company, once incorporated, becomes

SG5001: Managing Sustainable Operations and Projects

Seminar Activity 1 – Formative In groups of no more than 5 Seminar Activity Team Case/Company 1. This week you are to present the work in your allocated team.   2.With reference to your allocated case study, Compare the following with UEL: The transformed resources The transforming resources The output

This week, you will choose your communication proposal topic from

  This week, you will choose your communication proposal topic from these options: Internal Promotion New Job Opportunity Interview Pitching a Project Idea Mini TED Talk Topic of Your Choice Approved by Your Professor Reading Chapter 2 in Business Writing Today will help you identify your short- and long-range goals

Due this week is your Course Project Presentation. The assignment

Due this week is your Course Project Presentation. The assignment asks you to create a narrated PowerPoint that reflects what you have learned about your chosen topic over the last 7 weeks. In an effort to ensure you develop the strongest presentation possible, this week you will participate in a

1. Write up the problem-solving outline of what you want

  1. Write up the problem-solving outline of what you want to present through video. The talk needs to be equal to 5-7minutes maximum.  2. The problem solving can be any of these topics: (CHOOSE 1 ONLY)  -Train someone how to properly use an iPhone -Train someone on how to use

REQUIREMENTS Your submission must be your original work. No more

REQUIREMENTS Your submission must be your original work. No more than a combined total of 30% of the submission and no more than a 10% match to any one individual source can be directly quoted or closely paraphrased from sources, even if cited correctly. An originality report is provided when

Marshall, D. R., Davis, W. D., Dibrell, C., & Ammeter,

Marshall, D. R., Davis, W. D., Dibrell, C., & Ammeter, A. P. (2019). Learning off the job: Examining part-time entrepreneurs as innovative employees. Journal of Management, 45(8), 3091-3113. For the above mentioned article, Please create the following- Cover page The cover page will include: Articles Title and Author (s) Name of Journal