(Answered) STAD29 / STA 1007 assignment 1

0
(0)

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: 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: 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 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 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 utoronto.ca/~butler/ d29/chdage2.csv. Read the data

#STAD29 #STA #assignment

How useful was this post?

Click on a star to rate it!

Average rating 0 / 5. Vote count: 0

No votes so far! Be the first to rate this post.

Share This Post

Email
WhatsApp
Facebook
Twitter
LinkedIn
Pinterest
Reddit

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

Related Questions

(Answered) Task 2: Argumentative Research Paper- Organic foods verses GMOs

0 (0) Writing a research paper gives you an opportunity to explore a topic of special interest, research that topic, and organize your research findings in writing for an academic audience.   Through your preparation work, you have established an argumentative thesis statement and have planned a clear organization of

(Answered) M3A1: Citizens United

0 (0) (copy and paste the link) Review Campaign Finance: Abuses and Reforms. [Video File] [48 min 25 sec] before you participate in this activity. Parts of the video will discuss aspects of campaign finance and reform. Before engaging in this activity, please return to the first discussion topic on

(Answered) The decision in Williams v Roffey Bros signals that the courts in deciding whether or not to enforce a promise, may be guided less by technical questions of consideration than by questions of fairness, reasonableness and commercial utility.

0 (0) The decision in Williams v Roffey Bros signals that the courts in deciding whether or not to enforce a promise, may be guided less by technical questions of consideration than by questions of fairness, reasonableness and commercial utility.   The assignment will be in accordance with the following

(Answered) What are the effects of Ketamine treatment on treatment resistant depression?

0 (0) • Introductory statement clearly describes the phenomenon and main health issue • Clearly identifies the problem and gives an argument for examining the problem • Thesis statement is clear and well-articulated • Clearly articulates the particular population with clinical setting provided 1. Operational Definitions • Operational definitions of

(Answered) Management and Organizational Behavior.

0 (0) Description Exercise 17: Read Annual Pay Raises (W-68-69). This is located in the color-coded workbook section in the back of your book. ( Uhl-Bien, M., Osborn, R. N., & Schermerhorn, J. R. (2014).) Organizational Behavior. Hoboken, NJ: Wiley. ISBN:9781118517376 Review the exercise and complete steps 1 and 2.

(Answered) The Wall of Silence Reflective Journal

0 (0)  Assignment Instructions: For this course, you will be reading The Wall of Silence by Gibson and Singh (2003). Please read the book and reflect upon what you have read, and complete the assignment as described. The purpose of this reflective assignment is to provide the approach for connecting

(Answered) HEPATITIS C USING APRI SCORE

0 (0) Determination of Human Subjects Research Form and my project proposal. please, research about IRB. write the Description. Referencing the Determination Checklist on Page 2, briefly describe project objectives, the subject population and types of data/specimens to be collected and analyzed, how the data/specimens will be obtained, and why

(Answered) Company Description and SWOT

0 (0) Non Alcoholic Beverage company!!!! n this assignment, you will conduct a SWOT (Strength, Weakness, Opportunity, and Threat) analysis for the type of beverage you have selected, and for your company overall. As you work on the assignment, consider why you have chosen one type of non-alcoholic beverage over

(Answered) Oral Language chart of phone conversation

0 (0) Instructions In an APA formatted paper, paste the template found in doc. sharing. Define each of the terms and then watch the video of two children talking on the phone. Rate the language development of one of the two children in the video found at Use the SOLOM.

(Answered) Motivations of Private-Sector Organizations

0 (0)  Presidential Policy Directive 8 (PPD-8) is part of the national preparedness goal and provides a description for preparing for the threats in an all-hazards approach that pose the greatest risk to the United States. Community preparedness is a shared responsibility of the whole community. In addition to the

(Answered) Effective Resource Allocation

0 (0)  The discussion assignment for this week includes a review of the Key Assignment Outline completed by one of your classmates, as well as a substantial response to at least one other student. Primary Task Response: Your first task is to post your own Key Assignment Outline to the

(Answered) Ethics Case Study

0 (0) A student’s analysis of the ethic case must use the following written structural framework, which can be written as a memorandum to the file. Without the bullet points – these indicate required headings for each of the four sections. The following the description heading below to form a

(Answered) The Relativist Ethical Position.

0 (0)  In your post, address the following: To what extent would you agree with the view that research should rely on a relativist ethical position—rules or duties may vary across different communities and professional groups? What examples could you suggest to support this view? References: – Doing Research in

(Answered) Poverty in the classroom

0 (0) A four-unit research paper in APA formatting centered around the effects of poverty in education. The first unit needs to be about the effects poverty has on students in the classroom and needs to be 8-10 pages. Second unit is on the effects of substance abuse on students

(Answered) Causes of America’s War in Vietnam

0 (0) Description Formatting 12 font or smaller, standard script (e.g. Calibri, New Times Roman), 1.00-1.25 margins maximum, double spaced, clean appearance, etc. Basic organization is simple— don’t make it difficult Title— choose one that reflects your views on the topic to inform and engage your reader from the start,

(Answered) Workflows in telemetry

0 (0) Workflow analysis aims to determine workflow patterns that maximize the effective use of resources and minimize activities that do not add value. There are a variety of tools that can be used to analyze the workflow of processes and clarify potential avenues for eliminating waste. Flowcharts are a

(Answered) Critical Decision Making for Providers

0 (0) View the scenario called “Critical Decision Making for Providers”. In a 750-1,200 word paper, describe the scenario involving Mike, the lab technician, and answer the following questions: What were the consequences of a failure to report? What impact did his decision have on patient safety, on the risk