Data File: https://drive.google.com/file/d/0B6i_JzkQ2f6IeGRlMjhhTVlRbFU/view?usp
ID: 3296057 • Letter: D
Question
Data File:
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. (c) Estimate sigma^2 for the model fitted in (b). (d) Calculate the analysis of variance table for the model in (b) to test the significance of the regression at a significance level of alpha = 0.01. What conclusions can you draw? Place the R output correctly into an ANOVA table (e) Using the model in (b) predict Cholesterol for a 49 year old with a body mass index of 31.7.Explanation / Answer
All R code is shown in bold and the output of R code in italics.
(b)
I have stored the data is "dataset" dataframe.
model = lm(Cholestrol~Age+Body.Mass,data = dataset)
> model
Call:
lm(formula = Cholestrol ~ Age + Body.Mass, data = dataset)
Coefficients:
(Intercept) Age Body.Mass
-1.05355 0.02394 0.22944
The regression equation is
Cholestrol = -1.05355 + 0.02394 Age + 0.22944 Body.Mass
(c)
summary(model)
Call:
lm(formula = Cholestrol ~ Age + Body.Mass, data = dataset)
Residuals:
Min 1Q Median 3Q Max
-1.84244 -0.40173 -0.05326 0.53461 1.43725
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) -1.05355 1.09213 -0.965 0.3433
Age 0.02394 0.01029 2.327 0.0277 *
Body.Mass 0.22944 0.04641 4.943 3.55e-05 ***
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
Residual standard error: 0.8027 on 27 degrees of freedom
Multiple R-squared: 0.6054, Adjusted R-squared: 0.5762
F-statistic: 20.71 on 2 and 27 DF, p-value: 3.528e-06
Residual standard error of the model is 0.8027
Variance of the error term from the anova table in part (d) is 0.6443.
(d)
anova(model)
Analysis of Variance Table
Response: Cholestrol
Df Sum Sq Mean Sq F value Pr(>F)
Age 1 10.949 10.9490 16.994 0.00032 ***
Body.Mass 1 15.744 15.7443 24.436 3.547e-05 ***
Residuals 27 17.396 0.6443
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
As both p-values for Age and Body.Mass is less than the significance level of 0.01, we reject the null hypothesis test of the Anova model to conclude that both Age and Body.Mass are significant in determining the Cholestrol level and the regression model is significant.
(e)
Age = 49, Body.Mass = 31.7
Cholestrol = -1.05355 + 0.02394 * 49 + 0.22944 * 31.7 = 7.392758
Source DF SS MS F Age 1 10.949 10.949 16.994 Body.Mass 1 15.744 15.744 24.436 SSE 27 17.396 0.6443 Total 29 44.089 1.52031Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.