Question
R programming
R1. Below is a table showing a variety of countries (first column), the number of cigarettes consumed per adult per year (sec
R2. Figure out how to use the output from the Im function to create a residual plot, and then use this to help as you discuss
R1. Below is a table showing a variety of countries (first column), the number of cigarettes consumed per adult per year (second column), and the rate at which people die from coronary heart disease CHD) per 100,000 people (third column). Put these data into a dataframe in R. Then run a linear regression that examines how CHD rates (response variable) are predicted by cigarette consumption (predictor variable). What is the equation of the regression line you get? What are the units on the slope? Interpret the slope in this context. [Include your code, equation, units, and slope interpretation.] United States Canada Australia New Zealand United Kingdom Switzerland reland Iceland Finland West Germany 3900 3350 3220 256.9 211.6 238.1 211.8 194. 2790 187.3 110.5 233.1 150.3 124.7 41.2 82.1 118.1 31.9 14.3 144.9 59.7 126.9 43.9 36.3 2290 2160 1890 Netherlands 1800 1770 1700 1680 1510 1500 Austria Belgium Mexico Italy Denmark France Sweden 1270 1200 1090 Norway
R2. Figure out how to use the output from the Im function to create a residual plot, and then use this to help as you discuss each of the conditions required for building a linear model and whether you think they are met. R3. In Mauritania, the annual cigarette consumption is 30.3 cigarettes per peon. Predict the CHD rate using your model, ande look up this result on the interet. Discuss what you find and why it might be happening.
0 0
Add a comment Improve this question Transcribed image text
Answer #1

Importing rawdata rawdata <- read.csv (rawdata.csv, stringsAsFactors-, headerT) head (rawdata) ## cigarettes . consumed CHD

Regression equation CHD = 9.2842 + 0.1776 Cigarettes-consumed One unit increased in the cigarettes consumed, the CHD increase

Residuals vs Fitted Plot Residual plots are used to look for underlying patterns in the residuals that may mean that the mode

Add a comment
Know the answer?
Add Answer to:
R programming R1. Below is a table showing a variety of countries (first column), the number of cigarettes consumed...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT