Reference no: EM132414177
STAT 645 Assignment -
1. With the calcium data in "calcium.txt," consider the Decrease variable as your response and Treatment as your treatment. In what follows, I have recoded Treatment to equal 0 for placebo and 1 for calcium treatment.
(a) For the regression model
Decreasei = β0 + β1Treatmenti + εi,
write down the model matrix.
(b) Fit the above model, and report the coefficient estimates and standard errors.
(c) Based on the model, what is the p-value for the null hypothesis of no treatment effect?
(d) Now analyze the same data using a two-sample t-test, assuming equal variances. How do the results compare to those you obtained using the regression model?
(e) Assuming that the εi are normally distributed, what is the estimated distribution of Decrease when Treatment = 1?
2. With the onset data in "onset data.csv," conduct the following analysis.
(a) Create side-by-side box plots comparing time to onset with (i) the tx variable and (ii) the prior variable. Comment.
(b) Create a scatterplot of onset vs. age. Color code the points by prior status. Also, fit and overlay separate lowess curves, one each for prior = 0 and prior = 1.
(c) Fit the regression model
yi = β0 + β1txi + β2priori + β3agei + β4(prior x age) + εi
Interpret all coefficients and report their estimates and standard errors.
(d) Use matrix manipulation using a design matrix to verify the estimates and standard errors from above.
(e) What is a 95% confidence interval for the mean difference in onset times between the treatment and control groups, holding prior status and age constant?
(f) What is a 95% confidence interval for the mean response of a treated individual, age 35, with no prior tumor incidence?
3. Suppose that y1, y2, . . . , yn are i.i.d. realizations from the N(0, σ2) distribution. Derive the maximum likelihood estimator of σ2.
4. Suppose the times to infection following exposure to a particular bacteria follow the gamma distribution with shape parameter α, scale parameter β, and pdf
f(x) = 1/(Γ(α)βα)xα-1e-x/β.
Use the nlm function in R to compute the maximum likelihood estimates for the data in "gamma.csv."
Attachment:- Assignment Files.rar