Docsity

Best Linear Predictor of a Linear Mixed Effects Model: Derivation and Application, Assignments of Biostatistics

Toggle sidebar
bg1
Biostat/Stat 571: Coursework 2
Answer Key
January 23, 2009
Problem 1
Consider the class of linear predictors b?(y) = a+By, where aand Bare constants of dimensions (q+1) 1
and (q+ 1) n. Let W=bBy, and show that
E[(b?b)TA(b?b)] = faE[W]gTAfaE[W]g+trfAVar[W]g:
Deduce this is minimized by taking a=Bx and B=DzTV1. Hence show that
DzTV1(yx)
is the best linear predictor of b, whatever the distributions of band y.
Recall that the linear mixed e¤ects model is given by:
y=x +zb +with b(0;D);
where we drop the subscript indexing the subjects. The goal of this exercise is to …nd a linear combination
of y,b?, that minizes the mean square error of any linear combination of b?b. By our construction,
b?b=a+By (W+By ) = aW, where Wdepends on B.
E[(b?b)TA(b?b)] = E[(aW)TA(aW)]
=faE[W]gTAfaE[W]g+ trfAvar(W)g;
where we use the fact that for E[x] = ,cov[x] = and Asymmetric positive de…nite we have
E[xTAx] = TA + trfAg:
We can minimize this function in two steps. First, for any B, hence W, the …rst term is minimized to 0 by
a=E[W] = E[bBy] = B x:
Second, we seek the Bthat minimizes the second term, which is
trfAvar(W)g= trfAvar(bBy)g
=trfA[var(b)2cov(b;By) + var(By)g
=trfA[D2DzTBT+B V BT]g
=trfA(BDzTV1)V(BDzTV1)TADzTV1z DT+ADg;
where the third equality holds because cov(b;y) = cov(b;x +zb +) = DzTand the last equality
constructs a square term involving B. This expression is minimized by B=Dz TV1. Therefore the best
linear predictor of bis:
b?=a+By =Bx +B y =DzTV1(yx ):
Finally, note that the claim of the best linear predictor depends on the …rst and second moments of band
y, but not on their distributions.
pf3
pf4
pf5

Partial preview of the text

Download Best Linear Predictor of a Linear Mixed Effects Model: Derivation and Application and more Assignments Biostatistics in PDF only on Docsity!

Answer Key

January 23, 2009

Problem 1

Consider the class of linear predictors b?(y) = a+By, where a and B are constants of dimensions (q +1) 1 and (q + 1)  n. Let W = b By, and show that

E[(b?^ b)T^ A(b?^ b)] = fa E[W]gT^ Afa E[W]g + trfAVar[W]g:

Deduce this is minimized by taking a = Bx and B = DzT^ V ^1. Hence show that

DzT^ V ^1 (y x )

is the best linear predictor of b, whatever the distributions of b and y.

Recall that the linear mixed e§ects model is given by:

y = x + zb +  with b  (0; D);

where we drop the subscript indexing the subjects. The goal of this exercise is to Önd a linear combination of y, b?, that minizes the mean square error of any linear combination of b?^ b. By our construction, b?^ b = a + By (W + By) = a W, where W depends on B.

E[(b?^ b)T^ A(b?^ b)] = E[(a W)T^ A(a W)] = fa E[W]gT^ Afa E[W]g + trfAvar(W)g;

where we use the fact that for E[x] = , cov[x] =  and A symmetric positive deÖnite we have

E[xT^ Ax] = T^ A + trfAg:

We can minimize this function in two steps. First, for any B, hence W, the Örst term is minimized to 0 by

a = E[W] = E[b By] = Bx :

Second, we seek the B that minimizes the second term, which is

trfAvar(W)g = trfAvar(b By)g = trfA[var(b) 2 cov(b; By) + var(By)g = trfA[D 2 DzT^ BT^ + BV BT^ ]g = trfA(B DzT^ V ^1 )V (B DzT^ V ^1 )T^ ADzT^ V ^1 zDT^ + ADg;

where the third equality holds because cov(b; y) = cov(b; x + zb + ) = DzT^ and the last equality constructs a square term involving B. This expression is minimized by B = DzT^ V ^1. Therefore the best linear predictor of b is: b?^ = a + By = Bx + By = DzT^ V ^1 (y x ):

Finally, note that the claim of the best linear predictor depends on the Örst and second moments of b and y, but not on their distributions.

Problem 2

In this question we return to the yield data of Coursework 1, Question 2. (a) Code up the formula

b^ ~i = E[bijyi] = Dzb Ti Vb i 1 (yi xi b^ )

in R and obtain predictions for the yield data. Coding this in R, we use the REML estimates (ML also works, as long as you use the appropriate lme to check it).

D^ b = ^^20 zi = 1n V^ b = b^2  In + ^ 02 Jn xi b^ = ^ = y

We obtain the estimates:

REML MLE b1 17.6 16. b2 0.391 0. b3 28.6 27 b4 23.1 21. b5 56.7 53. b6 45 42.

(b) Obtain measures of the variability of the prediction via var(~bi bi). Using the formula at the bottom of page 80, the fact that zi = xi = 1n, V (^) i = V (^) j and properties of block diagonal matrices:

var(b~i bi) = D DzTi V i 1 ziD + DzTi V i 1 xi(xT^ V ^1 x)^1 xTi V i 1 ziD

= D DzTi V i 1 ziD + DzTi V i 1 zi(

X^ m

i=

xTi V i 1 xi)^1 zTi V i 1 ziD

= D DzTi V i 1 ziD + DzTi V i 1 zi(m  zTi V i 1 zi)^1 zTi V i 1 ziD = D DzTi V i 1 ziD(1 1 =m)

We obtain var(~bi bi) = 613: 7031. (ML estimates yield 533 : 3143 )

(c) ConÖrm your predictions using lme. Checking this with lme, we obtain only slight calculation di§erences on the order of 10 ^6 , probably due to the method of inverting V.

Problem 3

In this question you will Öt LMEMs to rat growth data. Crowder and Hand (1990, Analysis of Repeated Measures) describe data on the body weight of rats measured over 64 days. Body weight is measured (in grams) on day 1, and every 7 days subsequently until day 64, with an extra measurement on day 44. There are 3 groups of rats, each on a di§erent diet ñ 8 rats are on a control diet, and two sets of 4 rats are each on a di§ erent treatment. These data are contained within the nlme library, and can be accessed using the command data(BodyWeight). Fit linear mixed e§ects models to these data, with the primary aim to determine whether there are di§ erences in intercepts and slopes for each of the diets.

Model

Description

Separate Öts by treatment group, random intercepts

Separate Öts by treatment group, random intercepts and slopes, uncorrelated random e§ects

Separate Öts by treatment group, random intercepts and slopes, correlated random e§ects

Combined Öt, separate intercepts, common slope, random intercepts

Combined Öt, separate intercepts and slopes, random intercepts

Combined Öt, separate intercepts and slopes, random intercepts and slopes, uncorrelated random e§ects

Combined Öt, separate intercepts and slopes, random intercepts and slopes, correlated random e§ects

Table 1: LMEM analyses

Control

Treatment 1

Treatment 2

Model

^^0

^^1

^^0

^^1

^^

^

^^0

^^1

^^0

^^1

^^

^

^^0

^^1

^^0

^^1

^^

^

-^

-^

-^

-^

-^

-^

-^

-^

-^

-^

-^

-^

-^

-^

-^

-^

-^

-^

-^

-^

-^

-^

-^

-^

Table 2: Results of LMEM analyses

Testing for equal slopes. Formally we are testing H 0 : 11 = 12 = 13. We perform a likelihood ratio test comparing Model 4 (Combined Öt, separate intercepts, common slope, random intercepts) and Model 5 (Combined Öt, separate intercepts and slopes, random intercepts). Here Model 4 is the hypothesized model. For this test (see R output below) we obtain p < 0 : 0001 so we reject the null hypothesis of equal slopes. Note that the method="ML" in the lme command. This is necessary because the default is method="REML" which canít be used for likelihood ratio tests.

Testing for equal intercepts i.e. H 0 = 01 = 02 = 03. Here we compare a new Model 8 (Combined Öt, common intercepts and slopes, random intercepts) to Model 4 (Combined Öt, separate intercepts, common slope, random intercepts). Once again we have p < 0 : 0001 so we reject the null hypothesis of equal intercepts.

Testing for a common random e§ects distribution and common measurement error i.e. H 0 : D 1 = D 2 = D 3 and ^2  1 = ^2  2 =  ^23. Here we are comparing Model 7 (Combined Öt, separate intercepts and slopes, random intercepts and slopes, correlated random e§ects) to Model 3 (Separate Öts by treatment group, random intercepts and slopes, correlated random e§ects). Note that the log likelihood for Model 3 is the sum of the log likelihood from the 3 separate Öts. The likelihood ratio tests yields p < 0 : 001 so we reject the null hypothesis of both a common random e§ects distribution and a common measurement error.

Note that in order to test only a common random e§ects we need to Öt a model with di§erent Dís for di§erent treatment groups but with a common measurement error. This should be possible in R with some creative thinking.

Appendix

Breakdown of scores: 1 derivation 2 1 minimization 4

2a 3 2b 3 2c 1

3 7

Total 20