Exercise 4

Question 1.

Consider the first order autoregressive process AR(1): yi=ρyi-1i, i=1,...,n, where y0=0, εi~N(0,σ2) and i.i.d.
  1. Write down the likelihood function for the data.
  2. Find the MLEs of ρ and σ2.

Question 2.

The file Dyestuff.dat contains the dyestuff data. The object of experiment was to learn to what extent batch to batch variation in a certain raw material was responsible for variation in the final product yield. Five samples from each of six randomly chosen batches of raw material were taken and two laboratory determinations of product yield were made in two different laboratories for each of the resulting thirty samples.
  1. Define a proper model to describe the data.
  2. Does batch variation in the raw material strongly affects variation in the product yield?
  3. Are there systematic differences between test results performed in different laboratories?

Question 3.

The file Urine.dat gives ratios ut of fluid intake to urine output over five consecutive 8-hour periods (t=1,...,5) for 19 babies divided into two groups (G). The twelve babies in Group 1 received a surfactant treatment. The seven babies in Group 2 were given a placebo and constitute a control group.
  1. Define a proper model expressing ut as a linear function of t for both groups (for simplicity assume that the covariance matrix is the same for both groups). Fit the model.
  2. Test the hypotheses that the linear trend is the same for both groups.
  3. Do you think that a straight line is an appropriate model for the trend? If not, suggest way(s) to improve your original model.

Computational Notes for R users:

  • To perform the analysis of variance for balanced design with random effects you can use the usual aov fucntion and include random effects into the Error term in aov. See help for details.
  • To fit a general linear mixed effects regression model that involves both fix and random effects use the function lme from the package nlme. Please read help instructions carefully how to use this function. In particular, the function lme produces an lmeObject that contains useful information about coefficients, fitted values and residuals of the lme fit. See its help for details of its components.