1 2 MIXED MODELS (Sections 17.7 17.8) Exmple: Suppose tht in the fiber breking strength exmple, the four mchines used were the only ones of interest, but the interest ws over wide rnge of opertors, nd the opertors were chosen t rndom. This would be n exmple of mixed model: model including both fixed nd rndom fctors. The Two-Fctor Mixed Model There re two fctors. One (A) is fixed The other (B) is rndom. There re two versions of the two-fctor model commonly used. Both hve the sme model eqution, nmely I) In the unrestricted model, interctions re treted s in the rndom effects model: Ech B i ~ N(0, # B 2 ) Ech (!B) ij ~ N(0, # AB 2 ) Ech " ijt ~ N(0, # 2 ) The B j s, (!B) ij s, nd " it s re ll mutully independent rndom vribles. where Y ijt = µ +! i +B j + (!B) ij + " ijt, µ nd! i re constnts B j, (!B) ij, nd " ijt re rndom vribles. However, the conditions on the rndom vribles differ ccording to the version of the model.
3 4 II) The restricted model requires some intuition building. To see the ide, strt with the cell-mens model Y it = µ + $ i + " it. Recll: In order to fit this model by lest squres, we need n dditionl condition. A nturl one, if we think of µ s n overll men nd the $ i s s devitions from it, is # ˆ " i = 0. Indeed, it would be nturl to include the condition #" i = 0 s prt of the model, to indicte the interprettion of µ nd the $ i s tht we hve in mind. (In fct, some people do include this s prt of the model.) The restricted model tkes this interprettion for both the fixed nd mixed interction effects: It includes s prt of the model the restrictions #" i = 0 (i.e.,! = 0) nd #("B) ij = 0 (i.e., (!B) j = 0), for ech level j of B. So the ssumptions for the restricted model, in ddition to the model eqution, re: i) #" i = 0 ii) #("B) ij = 0 for ech j. iii) B j ~ N(0, # B 2 ) iv) " ijt ~ N(0, # 2 ) v) (!B) ij ~ N(0, ( "1)# 2 AB ) (Note: The messy-looking expression for the vrince is just rescling convention tht mkes lter formuls less messy.) vi) The B j s nd " ijt s re ll mutully independent, nd independent of the (!B) ij s vii) The (!B) ij s nd (!B) iq s re independent (or t lest uncorrelted) for j! q. Note tht in both cses, the sum is over i tht is, over the fixed effects.
5 6 Note: (ii) implies (detils left to the student) tht Cov((!B) ij, (!B) pj ) = - # AB 2 / for i! p. Thus the restricted model ssumes tht, for the sme level of B, the interction effects corresponding to different levels of A re negtively correlted. Which Model to Use? Some people hve defult preferences, s do most softwre pckges. But it s sensible to sk: Does one model fit the sitution better thn the other? If so, use it! One criterion sometimes used: A limited resource sitution is likely to produce negtively correlted interction for different A-levels of the sme B-level so the restricted model will reflect this. Exmple: Compring growth of two species of plnts -- -so species is fixed fctor with = 2. Suppose the plot in which the plnts re grown is of interest s rndom fctor. Thus b plots re rndomly selected. Ech plot is divided into 2r experimentl units. Species re rndomly ssigned to experimentl units so tht ech species is ssigned to r experimentl units in ech plot. (Thus we hve crossed, completely rndomized design.) The plnts re sown, grown specified mount of time, hrvested, dried, nd weighed. Dry weight is the response. Since resources (nutrients, wter, spce) in ech plot re limited, we expect negtive correltions between the finl weights of plnts in ech plot. Thus restricted model might be better thn n unrestricted model here.
7 8 Anlysis of Mixed Model Experiments The bsic ide follows long the lines of the methods for developing tests for rndom effect models. But some of the expected men squres will be different. An overview of the detils: We cn fit by lest squres nd use the fits to obtin the men squres. For exmple, with blnced design, we will get SSA = 1 " Y 2 i # 1 br br Y 2 Recll tht with the one-wy rndom effect model, to clculte E(SSA) (from which we then clculted E(MSA)), we used the eqution i For the unrestricted model, we will get: E(MSA) = Q(A) + r# AB 2 + # 2 (where Q(A) denotes qudrtic in the! i s) E(MSB) = r# B 2 + r# AB 2 + # 2 E(MSAB) = r# AB 2 + # 2 E(MSE) = # 2 ->Note tht the lst three expected men squres re the sme s in the two-wy complete rndom model, but E(MSA) is different. E(Z 2 ) = Vr(Z) + [E(Z)] 2 to clculte E(Y i 2 ) nd E(Y 2 ). We use the sme ide here, but the results re messier. The reson is tht, wheres in the one-wy rndom effects model, E(Y it ) = µ, in the mixed effects model, E(Y ijt ) = µ +! i. Consequently, [E(Y i )] 2 nd [E(Y )] 2 will involve terms tht re qudrtic (i.e., degree two polynomils) in the! i s.
9 10 Hypothesis tests in the unrestricted model: For fixed effect: Since A (nd no other fctor) is fixed, the min effects hypotheses for A re H 0 A : All! i s re zero H A : At lest one! i! 0. It turns out tht when H 0 A is true, Q(A) = 0, so tht vs E(MSA) = r# AB 2 + # 2 = E(MSAB). The rest of the theory goes over to give MSA/MSAB ~ F(dfA, dfab) s suitble test sttistic. For rndom effects: The hypotheses corresponding to H 0 B nd H 0 AB re exctly the sme s for the two-wy complete rndom model. Since the expected mens squres for B, AB, nd E re the sme s in tht model, the test sttistics re lso the sme for the mixed model s for the rndom complete model. These ides nd results generlize to other mixed models. In prticulr, E(MS * ) will be s for the corresponding rndom effects model, except tht whenever fixed effect fctor or n interction involving only fixed effects would occur, there is qudrtic in pproprite fixed effects nd their interctions insted of # -- 2 term. Exmple: For the complete three-wy model with two fixed fctors A nd C nd one rndom fctor B, we get E(MSA) = Q(A,AC) + rc# AB 2 + r# ABC 2 + # 2, where Q(A,AC) is qudrtic polynomil in the! i s nd the (!%) i s. For detils on the expected men squres, etc., see Section 17.8.2. -> As with rndom effects, in some cses there is no suitble single MS for the denomintor of the test sttistic, so we need to use liner combintions of men squres nd n pproximte F test. However, modern softwre cn do much of the detiled clcultions for us we need to focus our ttention on selecting n pproprite model nd interpreting the output crefully. For the restricted model, the results re similr (but remember tht the interprettion of # AB 2 is different).
11 Confidence Intervls Confidence intervls for contrsts of fixed effects re clculted s in fixed effects models, except tht the denomintor used in the corresponding hypothesis test (nd its degrees of freedom) must be used insted of MSE (nd its degrees of freedom). For exmple, in two-wy mixed model with fixed fctor A, to find confidence intervls for contrsts in the! i s, use MSAB nd dfab insted of MSE nd dfe. Confidence intervls for vrince components for rndom effects or interctions involving rndom effects re clculted just s for rndom effects models, but using just the rndom prts of the model.