Tải bản đầy đủ - 0 (trang)
7 EXAMPLE: TREATMENTS ARE FIXED AND LOCATIONS ARE RANDOM WITH A RCB AT EACH LOCATION

7 EXAMPLE: TREATMENTS ARE FIXED AND LOCATIONS ARE RANDOM WITH A RCB AT EACH LOCATION

Tải bản đầy đủ - 0trang

14



Analysis of Messy Data, Volume III: Analysis of Covariance



TABLE 13.7

Pairwise Comparisons of the Fertilizer Means Using the Simulate

Multiple Comparison Adjustment Method at Weed Seed Densities

of 0, 25, 34.79, and 45 per Sample for the Data in Section 13.5

Effect

fert

fert

fert

fert

fert

fert

fert

fert

fert

fert

fert

fert

fert

fert

fert

fert

fert

fert

fert

fert

fert

fert

fert

fert



fert

1

1

1

2

2

3

1

1

1

2

2

3

1

1

1

2

2

3

1

1

1

2

2

3



_fert

2

3

4

3

4

4

2

3

4

3

4

4

2

3

4

3

4

4

2

3

4

3

4

4



weed_s

34.79

34.79

34.79

34.79

34.79

34.79

45

45

45

45

45

45

25

25

25

25

25

25

0

0

0

0

0

0



Estimate

–5.475

–9.621

–15.153

–4.147

–9.679

–5.532

–6.739

–10.250

–16.573

–3.511

–9.833

–6.322

–4.262

–9.018

–13.792

–4.756

–9.530

–4.774

–1.166

–7.478

–10.317

–6.312

–9.151

–2.839



StdErr

2.125

2.120

2.121

2.121

2.121

2.117

2.485

2.478

2.455

2.511

2.489

2.474

1.891

1.909

1.899

1.884

1.868

1.892

2.022

2.168

1.963

2.143

1.911

2.052



df

15

15

15

15

15

15

15

15

15

15

15

15

15

15

15

15

15

15

15

15

15

15

15

15



tValue

–2.58

–4.54

–7.14

–1.95

–4.56

–2.61

–2.71

–4.14

–6.75

–1.40

–3.95

–2.56

–2.25

–4.72

–7.26

–2.52

–5.10

–2.52

–0.58

–3.45

–5.25

–2.94

–4.79

–1.38



Probt

0.0210

0.0004

0.0000

0.0695

0.0004

0.0196

0.0161

0.0009

0.0000

0.1823

0.0013

0.0219

0.0396

0.0003

0.0000

0.0234

0.0001

0.0234

0.5728

0.0036

0.0001

0.0100

0.0002

0.1867



Adjp

0.0893

0.0023

0.0000

0.2512

0.0022

0.0833

0.0673

0.0047

0.0001

0.5244

0.0062

0.0908

0.1534

0.0018

0.0000

0.0973

0.0009

0.0973

0.9378

0.0187

0.0009

0.0463

0.0017

0.5319



TABLE 13.8

Predicted Intercepts for Each Variety at Each Level

of Fert for the Data in Section 13.5

variety

Fertilizer

1

2

3

4



1

116.84

116.53

120.81

121.99



2

116.38

115.73

121.76

122.96



3

118.17

119.28

124.56

127.68



4

121.08

121.68

128.55

131.93



5

119.32

122.58

130.03

133.64



6

123.75

126.72

134.69

139.23



of the calves within each pen (grams/day). All of the calves did not weigh the same

nor were they of the same age at the start of the experiment. Eight calves were

randomly assigned to each pen. The average age in days and the average weight in

© 2002 by CRC Press LLC



Mixed Models



15



TABLE 13.9

Predicted Slopes for Each Variety at Each Level

of Fert for the Data in Section 13.5

Variety

Fertilizer

1

2

3

4



1

–1.63

–1.58

–1.68

–1.66



2

–1.51

–1.43

–1.49

–1.46



3

–1.53

–1.41

–1.50

–1.40



4

–1.54

–1.43

–1.48

–1.39



5

–1.55

–1.35

–1.41

–1.30



6

–1.47

–1.29

–1.31

–1.18



Variety Level Models

fert= 1

150



Yield lbs



130

110

90

70

50



30

0



10



20



30



40



50



Number of Weeds

1



2



3



4



5



6



FIGURE 13.2 Graph of the variety models evaluated at fertilizer level 1.



kilograms of the calves in each pen at the start of the experiment were determined

so they could be used as possible covariates. The model used to describe the ADG

as a linear function of age and weight was



(

) (

)

(

= (α + β AGE + γ WT) + (a + b AGE

(d + f AGE + g WT ) + r + ε



)



y ijk = α i + a j + d ij + βi + b i + fij AGE ijk + γ i + c j + g ij WTijk + rjk + ε ijk

i



i



ijk



i



ij



ij



ijk



ij



© 2002 by CRC Press LLC



j



ijk



j



jk



ijk



ijk



)



+ c jWTijk +



16



Analysis of Messy Data, Volume III: Analysis of Covariance



Variety Level Models

fert= 2

150



Yield lbs



130

110

90

70

50

30

0



10



20



30



40



50



Number of Weeds

1



2



3



4



5



6



FIGURE 13.3 Graph of the variety models evaluated at fertilizer level 2.



Variety Level Models

fert= 3

150



Yield lbs



130

110

90

70

50

30

0



10



20



30



40



50



Number of Weeds

1



2



3



4



5



FIGURE 13.4 Graph of the variety models evaluated at fertilizer level 3.



© 2002 by CRC Press LLC



6



Mixed Models



17



Variety Level Models

fert=4

150



Yield Ibs



130

110

90

70

50

30

0



10



20



30



40



50



Number of Weeds

1



2



3



4



5



6



FIGURE 13.5 Graph of the variety models evaluated at fertilizer level 4.



where

a j 

 σ a2

 



b  ~ iidN 0, Σ

σ ab

=

where

Σ

abc

abc

 j



c 

σ

 ac

 j



[



]



d ij 

 σ d2

 



 f  ~ iidN 0, Σ



ij

dfg where Σ dfg = σ df

 



g 

σ

 ij 

 dg



[



]



σ ab

σ b2

σ bc

σ df

σ f2

σ fg



σ ac 



σ bc  ,



σ c2 

σ dg 



σ fg  ,



2

σg 



rjk ~ iidN(0, σr2 ), εijk ~ iidN(0, σε2 ), and all of random variables are independent.

The first step in the analysis was to fit the above model using

random int age wt/type=un subject=loc;

to specify ⌺abc and

random int age wt/type=un subject=loc*dose;

to specify ⌺dfg.

Unfortunately, PROC MIXED was not able to fit the above model to the data

set, so an alternative process was used. The next step in the analysis was to fit a

model with zero covariances in Σabc and Σdfg and provide tests of individual hypotheses



© 2002 by CRC Press LLC



18



LOC BLOCK ADG0 AGE0 WT0 ADG10 AGE10 WT10 ADG20 AGE20 WT20 ADG30 AGE30 WT30

A

1

836

146

188

659

137

166

896

145

191

652

134

173

A

2

897

149

186

671

129

167

669

131

172

789

142

173

A

3

720

136

173

573

129

159

717

144

168

417

132

150

A

4

755

130

172

884

149

178

715

138

179

652

137

161

A

5

536

132

156

596

132

157

783

144

177

541

129

158

A

6

467

124

149

567

123

154

784

140

180

741

146

182

B

B

B

B

B

B



1

2

3

4

5

6



543

770

730

769

662

591



122

135

126

138

140

122



145

182

174

170

166

159



777

794

779

1003

600

661



123

129

133

148

129

140



171

171

165

194

152

163



872

833

821

912

734

810



132

144

125

138

121

123



168

169

172

181

153

164



651

650

861

839

947

908



121

128

142

134

141

149



157

157

168

166

173

176



C

C

C

C

C

C



1

2

3

4

5

6



858

714

692

922

513

981



131

134

125

133

124

141



167

157

159

181

141

173



977

1151

1073

667

1026

1008



143

147

147

125

137

136



178

195

193

152

183

177



1159

870

871

880

1043

906



147

129

132

138

145

135



196

160

168

175

191

168



612

574

732

713

852

1173



121

127

121

127

130

149



145

147

161

154

166

192



© 2002 by CRC Press LLC



Analysis of Messy Data, Volume III: Analysis of Covariance



TABLE 13.10

Average Daily Gain Data in g/day with Age and Weight as Possible Covariates for Four Doses

in Seven Blocks at Each of Seven Locations



1

2

3

4

5

6



653

638

772

723

806

819



125

135

127

130

149

139



153

153

169

165

177

179



740

652

885

808

809

740



121

129

138

149

144

130



167

162

188

174

170

169



587

755

385

616

634

684



130

138

121

125

122

141



154

165

139

153

158

164



601

623

625

582

848

713



126

125

134

129

141

147



160

156

157

164

187

171



E

E

E

E

E

E



1

2

3

4

5

6



851

761

755

472

683

588



143

133

138

121

142

136



172

176

172

140

169

160



631

899

887

782

946

797



126

135

128

141

147

127



150

171

171

162

195

162



990

866

1133

1034

709

863



144

130

147

146

126

148



191

176

193

189

151

170



898

893

699

791

924

1057



144

130

123

132

137

144



176

179

159

169

184

193



F

F

F

F

F

F



1

2

3

4

5

6



715

653

823

738

680

797



139

132

125

126

127

134



171

156

174

171

159

171



777

734

982

820

740

777



135

131

148

139

130

145



176

168

190

164

153

168



765

646

789

837

841

732



131

128

132

138

147

134



173

149

167

179

174

165



638

854

624

649

680

778



123

144

136

125

126

129



168

174

158

155

165

169



G

G

G

G

G

G



1

2

3

4

5

6



718

984

627

653

687

830



144

150

127

123

132

121



167

191

149

158

160

167



770

1009

834

1024

904

825



130

148

125

141

136

130



159

188

167

179

176

165



714

1072

713

853

724

742



128

149

126

130

130

128



150

187

153

174

147

151



889

1006

510

709

943

907



127

148

122

123

132

133



172

192

140

159

177

176



19



© 2002 by CRC Press LLC



Mixed Models



D

D

D

D

D

D



20



Analysis of Messy Data, Volume III: Analysis of Covariance



about the variances of Σabc and Σdfg , or the diagonal elements. The PROC MIXED

code in Table 13.11 was used to fit the independent slopes and intercepts model to

provide the type III sums of squares. Block(loc) was used to specify the distribution

of rjk, loc, age*loc and wt*loc were used to specify the diagonal elements of Σabc ,

and loc*dose, age*loc*dose, and wt*loc*dose were used to specify the diagonal

elements of Σdfg. In the lower part of Table 13.11, from the column ProbF, the

significance level corresponding to wt*dose*loc is 0.1952, indicating there is not

enough evidence to believe that σg2 is important in the description of the data set or

σg2 is negligible as compared to the other sources of variation in the data set. The

method of moments solution for the variance components and tests for the fixed

effects are in Table 13.12. Using a step-wise deletion process, the terms corresponding to age*dose*loc, age*loc, and wt*loc were determined to be negligible as

compared to the other sources of variation in the data set and hence were deleted

from the model (analyses not shown). The next model fit to the data set was yijk =

(αi + aj + dij) + βiAGEijk + γi WTijk + rjk + εijk using the PROC MIXED code in

Table 13.13. The results in Table 13.13 provide the REML estimates of the variance

components and tests for the fixed effects. The Fvalue corresponding to AGE*DOSE

tests H0: β1 = β2 = β3 = β4 vs. Ha: (not H0:), which has significance level 0.3811,

indicating there is not sufficient evidence to conclude the age slopes for each level

of dose are unequal. The term AGE*DOSE was deleted from the model and the

reduced model was fit using the code in Table 13.14. The significance level corresponding to WT*DOSE is 0.0416 indicating there is sufficient evidence to conclude

that H0: γ1 = γ2 = γ3 = γ4 is not reasonable, so unequal wt slopes for the levels of

dose is a reasonable model.

The model with unequal dose slopes for wt and equal dose slopes for age,

yijk (αi + aj + dij) + β AGEijk + γiWTijk + rjk + εijk, was used to compare the dose

effects. The estimate statements in Table 13.15 were used to investigate the form of

the response curve over the four equally spaced levels of dose, 0, 10, 20, and 30

mg/kg. The first set of estimate statements evaluated the relation between the intercepts or at wt = 0, not a reasonable place to compare the models. The next three

sets of three estimates evaluate the linear, quadratic, and cubic effects at three values

of wt, 140, 165, and 190 kg. There are strong quadratic effects at 140 and 165 kg

and a marginal linear effect at 190 kg. Table 13.16 contains the LSMEANS statements to provide estimates of the dose response curves at wt = 140, 165, and 190

kg. The average value of AGE (134.14 days) was used in computing the adjusted

means. Figure 13.6 is a graph of the response curves constructed from the estimated

means in Table 13.16. Table 13.17 contains the pairwise comparisons between the

dose means within each value of wt using the simulate method of controlling the

error rates within each value of wt. The results indicate that at 140 kg the mean of

dose 20 is larger than the means of doses 0 and 30, at 165 kg the mean of dose 0

is less than the means of doses 10 and 20, and there are no differences at 190 kg.

The conclusions from the above analyses are that random effects corresponding

to the two covariates were negligible as compared to the other variation in the model

and there were equal slopes in the age direction, but unequal slopes in the wt

direction. Before the levels of dose were compared the simplest form of the covariate

part of the model was determined.

© 2002 by CRC Press LLC



Mixed Models



21



TABLE 13.11

ROC MIXED Code to Fit the Independent Slopes and Intercepts Model to Obtain

the Type III Sums of Squares and Corresponding Tests

PROC MIXED cl covtest method=type3 data=ex136;

CLASS DOSE LOC BLOCK;

MODEL ADG=DOSE AGE WT AGE*DOSE WT*DOSE/ddfm=kr;

RANDOM LOC BLOCK(LOC) LOC*DOSE AGE*LOC WT*LOC AGE*LOC*DOSE WT*LOC*DOSE;

Source

DOSE



df

3



SS

11526.6287



AGE



1



1193.4043



WT



1



240173.1462



AGE*DOSE



3



1029.6457



WT*DOSE



3



8692.5244



LOC



6



11214.7150



35

18

6



83154.6831

60191.9854

13638.2266



6



9679.1807



18

18

49



44379.8742

39439.6110

78991.3411



Source

DOSE

AGE

WT

AGE*DOSE



ErrorDF

26.3

18.2

10.5

35.5



FValue

1.37

0.62

148.91

0.16



ProbF

0.2735

0.4406

0.0000

0.9210



WT*DOSE



40.7



1.50



0.2288



LOC



26.2



0.67



0.6780



BLOCK(LOC)

DOSE*LOC

AGE*LOC



49.0

49.0

20.3



1.47

2.07

0.95



0.1041

0.0223

0.4815



WT*LOC



29.4



0.80



0.5798



AGE*DOSE*LOC

WT*DOSE*LOC



49.0

49.0



1.53

1.36



0.1201

0.1952



BLOCK(LOC)

DOSE*LOC

AGE*LOC

WT*LOC

AGE*DOSE*LOC

WT*DOSE*LOC

Residual



© 2002 by CRC Press LLC



MS

EMS

3842.2096 Var(Residual) + 0.0073 Var(DOSE*LOC) +

Q(DOSE)

1193.4043 Var(Residual) + 38.809 Var(AGE*DOSE*LOC)

+ 155.24 Var(AGE*LOC) +

Q(AGE,AGE*DOSE)

240173.1462 Var(Residual) + 102.27 Var(WT*DOSE*LOC) +

409.08 Var(WT*LOC) + Q(WT,WT*DOSE)

343.2152 Var(Residual) + 53.72 Var(AGE*DOSE*LOC) +

Q(AGE*DOSE)

2897.5081 Var(Residual) + 105.44 Var(WT*DOSE*LOC) +

Q(WT*DOSE)

1869.1192 Var(Residual) + 0.0073 Var(DOSE*LOC) +

0.0049 Var(BLOCK(LOC)) + 0.0292 Var(LOC)

2375.8481 Var(Residual) + 2.4 Var(BLOCK(LOC))

3343.9992 Var(Residual) + 0.0106 Var(DOSE*LOC)

2273.0378 Var(Residual) + 83.228 Var(AGE*DOSE*LOC)

+ 332.91 Var(AGE*LOC)

1613.1968 Var(Residual) + 136.21 Var(WT*DOSE*LOC) +

544.83 Var(WT*LOC)

2465.5486 Var(Residual) + 91.326 Var(AGE*DOSE*LOC)

2191.0895 Var(Residual) + 191.58 Var(WT*DOSE*LOC)

1612.0682 Var(Residual)

ErrorTerm

0.6877 MS(DOSE*LOC) + 0.3123 MS(Residual)

0.4663 MS(AGE*LOC) + 0.5337 MS(Residual)

0.7508 MS(WT*LOC) + 0.2492 MS(Residual)

0.5882 MS(AGE*DOSE*LOC) +

0.4118 MS(Residual)

0.5504 MS(WT*DOSE*LOC) +

0.4496 MS(Residual)

0.002 MS(BLOCK(LOC)) +

0.6899 MS(DOSE*LOC) +

0.3081 MS(Residual)

MS(Residual)

MS(Residual)

0.9113 MS(AGE*DOSE*LOC) +

0.0887 MS(Residual)

0.711 MS(WT*DOSE*LOC) +

0.289 MS(Residual)

MS(Residual)

MS(Residual)



22



Analysis of Messy Data, Volume III: Analysis of Covariance



TABLE 13.12

Method of Moments Solution for the Variance Components and Tests

for the Fixed Effects in the Model

CovParm

Estimate

StdErr

ZValue ProbZ Alpha

Lower

Upper

LOC

–32176.4130 35179.5109 –0.91 0.3604 0.05 –101126.9874 36774.1614

BLOCK(LOC)

318.2416

241.4323

1.32 0.1875 0.05

–154.9569

791.4402

DOSE*LOC

163713.5246 22940.9219

7.14 0.0000 0.05

118750.1439 208676.9054

AGE*LOC

–0.3509

0.0492 –7.14 0.0000 0.05

–0.4473

–0.2545

WT*LOC

–0.7535

0.9779 –0.77 0.4410 0.05

–2.6701

1.1631

AGE*DOSE*LOC

9.3454

1.3096

7.14 0.0000 0.05

6.7787

11.9121

WT*DOSE*LOC

3.0223

0.4235

7.14 0.0000 0.05

2.1923

3.8524

Residual

1612.0682

225.8966

7.14 0.0000 0.05

1124.8736

2503.2974

Effect

DOSE

AGE

WT

AGE*DOSE

WT*DOSE



NumDF

3

1

1

3

3



DenDF

120.0

145.1

4.0

131.8

139.3



FValue

0.90

4.28

292.27

0.46

1.33



ProbF

0.4425

0.0403

0.0001

0.7074

0.2676



TABLE 13.13

PROC MIXED Code to Fit a Model with Unequal Dose Slopes for Both Weight

and Age and Provide Tests for Equality of Slopes Both Covariates

PROC MIXED cl covtest data=ex136;

CLASS DOSE LOC BLOCK;

MODEL ADG=DOSE AGE WT AGE*DOSE WT*DOSE/ddfm=kr;

RANDOM LOC BLOCK(LOC) LOC*DOSE;

CovParm

LOC

BLOCK(LOC)

DOSE*LOC

Residual

Effect

DOSE

AGE

WT

AGE*DOSE

WT*DOSE



Estimate

3763.6072

204.5725

857.4266

1866.2822



StdErr

2366.8954

174.8996

394.6405

264.9196



ZValue

1.59

1.17

2.17

7.04



ProbZ

0.0559

0.1211

0.0149

0.0000



NumDF

3

1

1

3

3



DenDF

137.4

135.2

139.6

136.9

139.3



FValue

2.58

7.57

387.14

1.03

1.63



ProbF

0.0562

0.0068

0.0000

0.3811

0.1845



© 2002 by CRC Press LLC



Alpha

0.05

0.05

0.05

0.05



Lower

1472.3659

63.2482

411.5402

1439.1607



Upper

22315.6202

3475.1285

2754.8013

2517.4807



Mixed Models



23



TABLE 13.14

PROC MIXED Code to Fit the Final Model as Well as Test the Equality

of the Dose Slopes for Weight

PROC MIXED cl covtest data=ex136;

CLASS DOSE LOC BLOCK;

MODEL ADG=DOSE AGE WT WT*DOSE/ddfm=kr;

RANDOM LOC BLOCK(LOC) LOC*DOSE;

CovParm

LOC

BLOCK(LOC)

DOSE*LOC

Residual

Effect

DOSE

AGE

WT

WT*DOSE



Estimate

3705.1510

198.2868

826.5531

1881.7969



StdErr

2327.5840

174.5112

383.9756

264.4138



ZValue

1.59

1.14

2.15

7.12



ProbZ

0.0557

0.1279

0.0157

0.0000



NumDF

3

1

1

3



DenDF

143.6

138.3

142.1

140.8



FValue

3.29

6.83

395.95

2.81



ProbF

0.0224

0.0100

0.0000

0.0416



© 2002 by CRC Press LLC



Alpha

0.05

0.05

0.05

0.05



Lower

1450.6282

59.8631

394.5256

1454.7029



Upper

21908.2228

3859.6929

2693.1898

2530.1426



24



Analysis of Messy Data, Volume III: Analysis of Covariance



TABLE 13.15

Estimate Statements to Investigate the Form of the Dose Response Curve

at Four Values of Weight

estimate

estimate

estimate

estimate

estimate

estimate

estimate

estimate

estimate

estimate

estimate

estimate



‘linear’ dose –3 –1 1 3;

‘quad’ dose 1 –1 –1 1;

‘cubic’ dose 1 –3 3 –1;

‘linear at 140’ dose –3 –1 1 3 wt*dose –420 –140 140 420;

‘quad at 140’ dose 1 –1 –1 1 wt*dose 140 –140 –140 140;

‘cubic at 140’ dose 1 –3 3 –1 wt*dose 140 –420 420 –140;

‘linear at 165’ dose –3 –1 1 3 wt*dose –495 –165 165 495;

‘quad at 165’ dose 1 –1 –1 1 wt*dose 165 –165 –165 165;

‘cubic at 165’ dose 1 –3 3 –1 wt*dose 165 –495 495 –165;

‘linear at 190’ dose –3 –1 1 3 wt*dose –570 –190 190 570;

‘quad at 190’ dose 1 –1 –1 1 wt*dose 190 –190 –190 190;

‘cubic at 190’ dose 1 –3 3 –1 wt*dose 190 –570 570 –190;



Label

Linear

Quad

Cubic



Estimate

–535.38

–562.48

400.52



StdErr

443.58

203.14

462.18



df

136.3

145.8

149.4



tValue

–1.21

–2.77

0.87



Probt

0.2295

0.0064

0.3876



Linear at 140

Quad at 140

Cubic at 140



–21.28

–161.95

63.43



91.20

42.46

98.43



81.6

86.3

89.8



–0.23

–3.81

0.64



0.8160

0.0003

0.5210



Linear at 165

Quad at 165

Cubic at 165



70.52

–90.42

3.23



57.40

25.92

58.53



18.2

18.9

19.6



1.23

–3.49

0.06



0.2348

0.0025

0.9566



Linear at 190

Quad at 190

Cubic at 190



162.32

–18.90

–56.97



83.34

36.53

79.38



65.1

59.9

53.1



1.95

–0.52

–0.72



0.0558

0.6068

0.4761



© 2002 by CRC Press LLC



Tài liệu bạn tìm kiếm đã sẵn sàng tải về

7 EXAMPLE: TREATMENTS ARE FIXED AND LOCATIONS ARE RANDOM WITH A RCB AT EACH LOCATION

Tải bản đầy đủ ngay(0 tr)

×