The data file can be downloaded from: https://drive.google.com/file/d/0B6i_JzkQ2
ID: 3269678 • Letter: T
Question
The data file can be downloaded from:
https://drive.google.com/file/d/0B6i_JzkQ2f6IeGRlMjhhTVlRbFU/view?usp=sharing
It is well known that the concentration of cholesterol in blood serum increases with age but it is less clear whether cholesterol level is also associated with body weight. The table below shows serum cholesterol (millimoles per litre), age (years) and body mass index (weight divided by height squared, where weight was measured in kilograms and height in meters). The dataset is Using R software: (b) Fit a multiple linear regression model to the data (including both independent variables). Show the final fitted model. (k) After fitting the model in (b) test the statistical significance of each regressor (one at a time) at the alpha = 0.01 level. (l) From the available data what model do you think would provide the 'best' prediction of Cholesterol? Explain why. State the final fitted model.Explanation / Answer
> D=read.table(file.choose(),header=TRUE)
> attach(D)
A)
> Fit=lm(Cholesterol~Age+Body_mass)
> Fit
Call:
lm(formula = Cholesterol ~ Age + Body_mass)
Coefficients:
(Intercept) Age Body_mass
-1.05355 0.02394 0.22944
Cholesterol= -1.05355+0.02394*Age + 0.22944 * Body_mass
this the final fitted model.
B)
> Fit1=lm(Cholesterol~Age)
> summary(Fit1)
Call:
lm(formula = Cholesterol ~ Age)
Residuals:
Min 1Q Median 3Q Max
-1.6187 -0.8105 0.1161 0.4469 3.1466
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 3.71386 0.69462 5.347 1.08e-05 ***
Age 0.04019 0.01322 3.041 0.00507 **
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
Residual standard error: 1.088 on 28 degrees of freedom
Multiple R-squared: 0.2483, Adjusted R-squared: 0.2215
F-statistic: 9.251 on 1 and 28 DF, p-value: 0.005068
Comment : we can see here p-values greter than 0.01 so we do not reject Ho means Age is not significant.
> Fit2=lm(Cholesterol~Body_mass)
> summary(Fit2)
Call:
lm(formula = Cholesterol ~ Body_mass)
Residuals:
Min 1Q Median 3Q Max
-2.4960 -0.3180 -0.1083 0.4994 1.3911
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) -0.68782 1.16282 -0.592 0.559
Body_mass 0.26394 0.04732 5.578 5.73e-06 ***
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
Residual standard error: 0.8636 on 28 degrees of freedom
Multiple R-squared: 0.5263, Adjusted R-squared: 0.5094
F-statistic: 31.11 on 1 and 28 DF, p-value: 5.732e-06
Comment :we can see here p-values less than 0.01 so we do reject Ho means variable Body_mass is significant.
C) The final model is
> Fit2=lm(Cholesterol~Body_mass)
> Fit2
Call:
lm(formula = Cholesterol ~ Body_mass)
Coefficients:
(Intercept) Body_mass
-0.6878 0.2639
Cholesterol= -0.6878 + 0.2639 * Body_mass
This is the best model for prediction of Cholesterol.
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
Best of Luck :)
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.