当前位置:天才代写 > R语言代写,r语言代做-无限次修改 > STAT 321代写 Assignment代写 R代写

STAT 321代写 Assignment代写 R代写

2021-08-12 16:55 星期四 所属: R语言代写,r语言代做-无限次修改 浏览:426

STAT 321 W21 Assignment #2

STAT 321代写 1)We will continue with the model you fit in Question 2d) of Assignment #1 to predict body fat percentage from body measurements.

1)  STAT 321代写

We will continue with the model you fit in Question 2d) of Assignment #1 to predict body fat percentage from body measurements. Continue with the model you fit in Question 2d) of A1.

a)

Use the predict function in R to obtain a 95% prediction interval for your instructor’s BFP you predicted in the last question of A1.

> new = data.frame(age = *,weight = *,height = *,abdomen=*)# creates a vector of

values of the explanatory variates for which you wish to predict the response

> predict(yourmodelname,newdata=new,interval=”prediction”) #yields a 95%

prediction interval based on the fitted model for these values

b)

Consider again the scatterplot from A1. Might multicollinearity be an issue with this data? Briefly explain.

c)  STAT 321代写

Calculate the VIF (Variance Inflation Factor) for both the weight and abdomen variates. Comment on your findings.

d)

Note that age and height do not appear to account for a significant amount of the variation in BFP after accounting for the variation in BFP explained by weight and waist size Use the additional sum of squares procedure to test this hypothesis. Do not use the anova command just yet. Perform this test the way we performed in lectures – by fitting the two models and calculating the SS(Res) of the two models from the residual standard errors. As with all hypothesis tests, be sure to state the null hypothesis, value of test statistic, p-value (using the pf function), and conclusion in the context of the study.

 

STAT 321代写
STAT 321代写

 

e)  

Now go ahead and verify the results from this test using the anova function.

f)

Which model (full vs reduced) yields the highest R2 ? Provide a brief explanation.

g)

Which model yields the highest residual standard error? Provide a brief explanation.

h)  

Body mass index (BMI), defined as the ratio of a person’s weight (in kg) to the square of their height (m2 ), is a commonly used measure of the relative health of an individual. Is BMI significantly related to body fat percentage, after accounting for age, weight, height, and waist size? Answer this question by adding BMI to the fit of the model.

i)

Has the inclusion of the BMI variate changed the significance of any of the other variates?

2) STAT 321代写

The preterm dataset contains data on the birthweight (grams) and gestational age (i.e. duration of pregnancy of mother, in weeks) of 40 preterm babies at 3 different hospitals (Source: Matthews D: STAT 631 Course Notes: Introduction to Statistical Methods in Health Informatics. Department of Statistics and Actuarial Science, University of Waterloo, 2013).

a) Provide a scatterplot matrix of the data. Briefly comment on the relationship between the response, birthweight, and the other variables.

b) Fit a regression model to the data. What proportion of the variation in birthweight is accounted for the gestational age and hospital?

c) Based on the p-values associated with the individual parameters, clearly and concisely state your conclusions in the context of the study.

d) After accounting for gestational age, is there a difference in mean birthweight between infants born at hospital B and hospital C? Answer this question by performing an additional sum of squares test using the anova function. Be sure to show your code in fitting the reduced model.

 

STAT 321代写
STAT 321代写

 

其他代写:data代写 code代写 report代写 paper代写 作业加急 北美代写 CS代写  澳大利亚代写 essay代写 assignment代写 homework代写 加拿大代写 英国代写 作业代写

合作平台:essay代写 论文代写 写手招聘 英国留学生代写

 

 

天才代写-代写联系方式