Linear modeling: Can anyone use R studio to do this problem. 6. In the Bodyfat d
ID: 3304220 • Letter: L
Question
Linear modeling:Can anyone use R studio to do this problem. 6. In the Bodyfat dataset, see here https://rstudio-pubs-static.s3.amazonaws. com/65314_cOd1e5696cdd4e93a3784ea67f9e3d34.html, consider the linear mode Assume that the errors are ii.d normal. (a) (1 points) Construct an F-test for testing Ho : 1 +M = 3+Ba. Describe your method and report the value of the F-statistic, its degrees of freedom and the p-value (b) (1 points) Construct a t-test for testing Ho : A + ,-As +A. Describe your method and report the value of the t-statistic, its degrees of freedom and the p-value (c) (0.5 points) How is the value of your t-test statistic related to the value of the F-test statistic?
Explanation / Answer
Hello There,
Thanks for the question.I am assuming you have experience in working with R and proceeding with the answer.
The code is as follows:
str(BODYFAT) # loading dataset
2. Based on both the scatterplot matrix and the correlation matrix, do you feel any of the explanatory variables are “highly correlated” with another explanatory variable? If so, which are “highly correlated”? Why?
Weight and chest appear to be heighly correlated. It looks like they have a strong, positive, linear relationship.
3. If two explanatory variables are highly correlated with each other, we should remove one of them. Which one should be removed is up to you, but often a strategy of running simple linear regressions (response variable versus each of the explanatory variables) and/or running a multiple regression with only the explanatory variables that are “highly correlated” as the predictors can help decide which one to remove. If needed, decide which highly correlated variable(s) should be removed.
Note: if a variable is removed at this point, the rest of the analysis is performed without that variable.
Step 3: checking for outliers
In addition to using the scatterplot matrix to determine if there are any outliers, a residual plot versus predicted values can tell us if there are any outliers. If there are, a residual plot versus each explanatory variable can help in identifying the outliers.
Additional plots to identify outliers.
9. Perform an F-test.
a. State the null and alternative hypotheses in words and notation.
( H_0: eta_1=eta_2=eta_3=0 )
( H_A ): At least one ( eta eq 0 )
b. Give the F-statistic with degrees of freedom and the p-value.
c. State a conclusion in the context of the problem.
There is convincing evidence to suggest that at least one of the explantory variables of Age, Height, or Chest is significant in predicting Body Fat, with a p-value < 0.0001. Therefore, we will reject the null hypothesis.
d. Is it necessary to continue with the analysis? Why or why not?
Yes we should continue because we don't know which variable(s) is significant in predicting fat.
10. Perform a t-test on each explanatory variable.
a. What are the null and alternative hypotheses for each t-test?
( H_0: eta_i=0 )
( H_A: eta_i eq 0 )
b. Give the t-statistics (with degrees of freedom) and p-value for each t-test.
c. For Age only, state a conclusion in the context of the problem.
There is convincing evidence to suggest that Age is significant in predicting body fat, with a p-value of 0.005121. Thus, we will reject the null hypothesis.
d. In a backwards selection process, would any of the explanatory variables drop out? Why or why not? If so, which one would drop out first? Why?
11. Using the model after performing a backwards selection process, answer the following questions:
a. Write the least-squares regression equation. Define the terms in the equation.
WITHOUT WEIGHT:
FAT=-21.28787+0.08529*AGE-0.49338*HEIGHT+0.70678*CHEST
WITH WEIGHT:
FAT=20.52307+0.11408*AGE+0.12893*WEIGHT-0.88763*HEIGHT+0.32545*CHEST
b. Interpret the coefficient of Age in the context of the problem. (Be able to interpret the other coefficients as well.)
WITHOUT WEIGHT:
With the variables of height and chest in the model, for every additional year body fat increases by 0.08.
WITH WEIGHT:
With the variables of weight, height, and chest in the model, for every additional year body fat increases by 0.11.
c. Predict percent body fat for a 30 year old who is 72 inches tall, weighs 180 pounds, and has a chest circumference of 105 cm. (If one or more of these variables is not in the final model, ignore its value.) Use R to obtain this predicted value. In addition, obtain and interpret a 95% prediction interval for this person.
d. What percent of the variation in percent body fat is explained by this regression model?
e. What is the estimate of ( sigma ), the standard deviation of the residuals?
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.