# STAD29 / STA 1007 assignment 1

(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

Pages (275 words)
Standard price: \$0.00

### Latest Reviews

Impressed with the sample above? Wait there is more

Related Questions

### INITIAL POST (due 9/25): Compare the grandmother’s understanding of God

INITIAL POST (due 9/25): Compare the grandmother’s understanding of God and belief to the Misfit’s understanding in “A Good Man Is Hard to Find.” Analyze

### There are three financial statements that are prepared regardless of

There are three financial statements that are prepared regardless of the business structure (nonprofit, private; nonprofit, public; for-profit, private; or for-profit, public): Balance sheet. Income

Please view and read the attached file for answers                                    Questions Relate the components of a confederative and unitary form of government. Understand the principles of

### For this weeks assignment you will be considering how news media coverage affects public perceptions of issues in the news.You

For this week’s assignment, you will be considering how news media coverage affects public perceptions of issues in the news.You will be selecting a current

### Select 5 of the following questions (20% each). Answer in

Select 5 of the following questions (20% each). Answer in complete sentences.  Use concise, accurate writing to explain your answers.  Use a separate sheet(s) of paper

Table of Contents Week 3 Week 3 Discussion Week 3 Discussion Previous Next  Use of Multimedia in the U.S. The discussion assignment provides a forum

### Research the latest GDP report for the United States (start

Research the latest GDP report for the United States (start here: https://www.bea.gov/national/index.htm#gdp (Links to an external site.)). In a well-written paper, complete the following: List

### Problem #1. The data correspond to yields (in tons per

Problem #1. The data correspond to yields (in tons per hectare) of a pasture with 3 levels of nitrogen fertilizers, the design was randomized,

### 900-1100 One of the more important measures in regard to

900-1100 One of the more important measures in regard to international economics is the balance of payments. Think of it as a national accounting measure

### This week’s journal articles focus on empowering leadership and effective

This week’s journal articles focus on empowering leadership and effective collaboration in geographically dispersed teams, please answer the following questions: How do geographically dispersed teams

### Discussion Topic Photosynthesis When a plant grows, the atoms used come from

Discussion Topic Photosynthesis When a plant grows, the atoms used come from carbon dioxide in the air and water. Plants are able to accomplish

### Monocultural Psychology According to statistics, by the year 2050, 50%

Monocultural Psychology According to statistics, by the year 2050, 50% of the U.S. population is expected to consist of ethnic minorities. As the United

New questions