Tải bản đầy đủ - 0 (trang)
6 EXAMPLE: TWO-WAY MIXED EFFECTS TREATMENT STRUCTURE IN A CRD

6 EXAMPLE: TWO-WAY MIXED EFFECTS TREATMENT STRUCTURE IN A CRD

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

Mixed Models



9



design structure is a completely randomized design with four replications per fertilizer-variety combination. Weeds are a competitor of the wheat plants and since

there was not to be any weed control (or any other chemicals used) used on the

plots, a sample of the top one inch of the soil of each plot was obtained (100 g) and

the number of weed seeds were counted. The number of weed seeds per sample was

to be considered as a possible covariate. Table 13.2 contains the PROC MIXED code

to fit the independent slopes and intercepts model where the fixed effects are Fert,

Weed_s, and Weed_s*Fert and the random effects are Variety, Weed_s*Variety,

Variety*Fert and Weed_s*Varity*Fert. The significance levels associated with the

random effects involving the covariate are 0.0099 and 0.1275 for Weed_s*Variety

and Weed_s*Variety*Fert, respectively. This is an indication that possible

Weed_s*Variety*Fert is not needed in the model. To continue the investigation,

REML solutions were obtained with and without Weed_s*Variety*Fert and the AIC

were obtained to determine the need for the term. Table 13.3 contains the PROC

MIXED code to fit the full model and Table 13.4 contains the PROC MIXED code

to fit the reduced model. In both cases, the independent slopes and intercepts form

of the models were used, i.e., σab and σcd of Model 13.2 were set to zero. The AIC

for the full model is 417.83 and for the reduced model is 422.61, indicating that

Weed_s*Variety*Fert is a useful term in the model. The next step was to fit the

correlated slopes and intercepts model to the data. To specify the correlated slopes

and intercepts model or specify Σab and Σcd, the following random statements need

to be used:

Random int weed_s/type=un subject = variety; for ⌺ab and

Random int weed_s/type=un subject=variety*fert; for ⌺cd.



Unfortunately, that model with these two statements would not converge, so a simpler

covariance matrix was used. The model that did converge involved setting σab = 0,

which was accomplished by using the random statement:

Random int weed_s/type=un(1) subject = variety;



which sets the off diagonal elements of Σab equal to zero. Table 13.5 contains the

PROC MIXED code using the above random statements to fit Model 13.2 with σab =

0. The elements U(1,1), U(2,1), and U(2,2) corresponding to variety in the subject

column provide the elements of Σab and the elements U(1,1), U(2,1) and U(2,2)

corresponding to variety*fert in the subject column provide the elements of Σcd.

Element U(2,1) for variety is zero which is the result of using type = un(1) in the

random statement. The bottom part of Table 13.5 contains the tests for the fixed effects

in the model. The significance level associated with the weed_s*fert term in the model

is 0.0868 which is a test of the hypothesis that the fertility slopes are equal. One

could conclude there is not sufficient evidence (since the significance level is greater

than 0.05) to say the slopes are unequal and delete the weed_s*fert term from the

model. In which case an equal slopes model would be used to compare the levels of

fertilizer. However, on the other hand, one could say there is reasonable evidence

(since the significance level is close to 0.05) to conclude the slopes are likely to be

unequal and use the unequal slopes model to compare the levels of fertilizer. The

LSMEAN statements in Table 13.6 provide estimates of the regression models at

© 2002 by CRC Press LLC



10



Analysis of Messy Data, Volume III: Analysis of Covariance



TABLE 13.2

PROC MIXED Code to Fit the Independent Intecepts and Slopes Model with

Type III Sums of Squares to Test Hypotheses about the Variance Components

proc MIXED cl covtest cl method=type3 data=ex_13_5;

class variety fert;

MODEL yield=fert weed_s weed_s*fert/ddfm=kr;

RANDOM variety weed_s*variety variety*fert weed_s*variety*fert;

Source

fert



df

3



weed_s



1



weed_s*fert



3



10.77039



3.59013



variety



5



44.87971



8.97594



weed_s*variety



5



34.91409



6.98282



variety*fert



15



29.52654



1.96844



weed_s*variety*fert



15



29.45335



1.96356



Residual



48



61.07080



1.27231



Source

fert



ErrorDF

22.0



FValue

10.12



ProbF

0.0002



weed_s



5.5



856.05



0.0000



weed_s*fert



24.6



2.06



0.1321



variety



20.7



4.94



0.0039



weed_s*variety



23.1



3.95



0.0099



variety*fert

weed_s*variety*fert



48

48



1.55

1.54



0.1262

0.1275



Source

Estimate

variety

17.09539

weed_s*variety

0.01056

variety*fert

5.18887

weed_s*variety*fert 0.00403

Residual

1.27231



© 2002 by CRC Press LLC



SS

54.40389



MS

18.13463



EMS

Var(Residual) + 0.1001

Var(variety*fert) + Q(fert)

Var(Residual) + 95.402

Var(weed_s*variety*fert) +

381.61 Var(weed_s*variety) +

Q(weed_s,weed_s*fert)

Var(Residual) + 117.5

Var(weed_s*variety*fert) +

Q(weed_s*fert)

Var(Residual) + 0.1047

Var(variety*fert) + 0.4188

Var(variety)

Var(Residual) + 123.46

Var(weed_s*variety*fert) +

493.85 Var(weed_s*variety)

Var(Residual) + 0.1342

Var(variety*fert)

Var(Residual) + 171.48

Var(weed_s*variety*fert)

Var(Residual)



4866.61369 4866.61369



StdErr

10.37430

0.00724

2.95962

0.00223

0.23428



ZValue

1.65

1.46

1.75

1.81

5.43



ErrorTerm

0.7458 MS(variety*fert) +

0.2542 MS(Residual)

0.7727 MS(weed_s*variety) +

0.2273 MS(Residual)

0.6852 MS(weed_s*variety*fert) +

0.3148 MS(Residual)

0.7805 MS(variety*fert) +

0.2195 MS(Residual)

0.72 MS(weed_s*variety*fert) +

0.28 MS(Residual)

MS(Residual)

MS(Residual)

ProbZ

0.0994

0.1446

0.0796

0.0708

0.0000



Mixed Models



11



TABLE 13.3

PROC MIXED Code to Fit the Independent Slopes and Intercepts Model

proc mixed cl covtest ic data=ex_13_5;

class variety fert;

model yield=fert weed_s weed_s*fert/ddfm=kr;

random variety weed_s*variety variety*fert weed_s*variety*fert;

CovParm

variety

weed_s*variety

variety*fert

weed_s*variety*fert

Residual

Neg2LogLike

407.83

Effect

fert

weed_s

weed_s*fert



Estimate

22.31045

0.01170

6.50305

0.00496

1.19896



StdErr

16.53183

0.00914

3.94944

0.00293

0.22239



ZValue

1.35

1.28

1.65

1.69

5.39



ProbZ

0.0886

0.1003

0.0498

0.0455

0.0000



Alpha

0.05

0.05

0.05

0.05

0.05



Lower

7.72770

0.00389

2.60757

0.00202

0.85950



Parameters

5



AIC

417.83



AICC

418.56



HQIC

413.66



BIC

416.79



CAIC

421.79



NumDF

3

1

3



DenDF

26.0

5.3

26.5



FValue

9.76

845.95

2.08



ProbF

0.0002

0.0000

0.1264



Upper

214.86710

0.13646

35.39015

0.02538

1.78936



TABLE 13.4

PROC MIXED Code to Fit the Reduced Independent Slopes

and Intercepts Model

proc mixed cl covtest ic data=ex_13_5;

class variety fert;

model yield=fert weed_s weed_s*fert/ddfm=kr;

random variety weed_s*variety variety*fert;

CovParm

variety

weed_s*variety

variety*fert

Residual



Estimate

19.96009

0.01321

13.15558

1.41400



StdErr

16.22121

0.00937

4.94595

0.24846



ZValue

1.23

1.41

2.66

5.69



ProbZ

0.1093

0.0794

0.0039

0.0000



Alpha

0.05

0.05

0.05

0.05



Lower

6.42950

0.00473

7.07120

1.03013



Neg2LogLike

414.61



Parameters

4



AIC

422.61



AICC

423.09



HQIC

419.27



BIC

421.77



CAIC

425.77



NumDF

3

1

3



DenDF

37.3

5.3

67.5



FValue

6.26

834.73

3.78



ProbF

0.0015

0.0000

0.0144



Effect

fert

weed_s

weed_s*fert



Upper

272.16194

0.11026

32.52760

2.06208



weed_s = 0, 25, 34.79 (the mean of weed_s), and 45 seeds per plot using the unequal

slopes model. For this study it is reasonable to estimate and compare the levels of

fert at weed_s equal to zero since with the use of chemical the researcher could

eliminate the weeds from the plots. The regression lines for the levels of fert are

© 2002 by CRC Press LLC



12



Analysis of Messy Data, Volume III: Analysis of Covariance



TABLE 13.5

PROC MIXED Code to Fit the Final Model to the Data in Section 13.5

proc mixed cl covtest data=ex_13_5;

class variety fert;

model yield=fert weed_s weed_s*fert/solution;

random int weed_s/type=un(1) subject=variety solution;

random int weed_s/type=un subject=variety*fert solution;

CovParm

UN(1,1)

UN(2,1)

UN(2,2)

UN(1,1)

UN(2,1)

UN(2,2)

Residual



Subject

Estimate StdErr ZValue ProbZ Alpha Lower

Upper

variety

21.62078 15.68449 1.38 0.0840 0.05

7.61169 193.86792

variety

0.00000

variety

0.01156 0.00875 1.32 0.0931 0.05

0.00394

0.11970

variety*fert 3.83690 4.95720 0.77 0.2195 0.05

0.82909 1308.83111

variety*fert 0.07919 0.10718 0.74 0.4600 0.05 –0.13088

0.28926

variety*fert 0.00311 0.00355 0.88 0.1907 0.05

0.00075

0.32554

1.25670 0.25640 4.90 0.0000 0.05

0.87408

1.96094



Effect

fert

weed_s

weed_s*fert



NumDF

3

1

3



DenDF

15.0

5.0

15.0



FValue

12.59

893.71

2.65



ProbF

0.0002

0.0000

0.0868



TABLE 13.6

Least Squares Means for the Levels of Fertilizer at Four Levels

of Weed Infestation

LSMEANS

LSMEANS

LSMEANS

LSMEANS



fert/diff

fert/diff

fert/diff

fert/diff



Weeds = 34.79

fert

1

2

3

4



Estimate

65.749

71.224

75.371

80.903



StdErr

2.861

2.863

2.860

2.860



at

at

at

at



means adjust=simulate;

weed_s=45 adjust=simulate;

weed_s=25 adjust=simulate;

weed_s=0 adjust=simulate;

Weeds = 45

Estimate

50.050

56.790

60.301

66.623



StdErr

3.242

3.268

3.261

3.244



Weeds = 25

Estimate

80.808

85.070

89.826

94.600



StdErr

2.580

2.557

2.575

2.562



Weeds = 0

Estimate

119.254

120.420

126.732

129.571



StdErr

2.414

2.353

2.500

2.297



displayed in Figure 13.1. Table 13.7 contains the pairwise comparisons between the

levels of fert at each value of weed_s where the “adjust=simulate” option was

selected to control the error rates for multiple comparisons (Westfall et al., 1999).

The adjusted significance levels are in the column titled “Adjp.” At the 0.05 level,

the means for Fert levels 1 and 2 are never significantly different, the mean of Fert 1

is always significantly less than the means of Fert 3 and Fert 4, the mean of Fert 2

is significantly less than the mean of Fert 3 only at weed_s = 0, the mean of Fert 2

is always less than the mean of Fert 4, and the means of Fert 3 and 4 are never different.



© 2002 by CRC Press LLC



Mixed Models



13



Fertility Level Models with Random Varieties

150



Yield lbs



130

110

90

70

50

0.00



10.00



20.00



40.00



30.00



50.00



Number of Weeds

1



2



3



4



FIGURE 13.1 Graph of the fertility level models with unequal slopes.



The final step taken in this analysis was to provide predicted values for the

slopes and intercepts for each variety grown at each level fertilizer. The predicted

values were constructed by using the estimates of the slopes and intercepts for each

fertilizer level using the fixed effects solution and the predicted values of the slopes

and intercepts for each variety and for each variety*fert combination from the

ˆ i + ãj + c˜ ij and

random effects part of the solution. The predicted values are ãpij = α

b˜ pij = βˆ i + b˜ j + d˜ ij, where ãj are the predicted intercepts correspond to the jth variety, c˜ ij

are the predicted intercepts corresponding to the ijth combination of fert and variety, b˜ j are the predicted slopes correspond to the jth variety, and d˜ ij are the predicted

slopes corresponding to the ijth combination of fert and variety. The predicted

intercepts are in Table 13.8 and the predicted slopes are in Table 13.9. Figures 13.2

through 13.5 are plots of the predicted regression models for each of the fertilizer

levels. Prediction bands could be constructed for the population of variety models

at each level of fertilizer using the method in Chapter 12. The construction of the

prediction bands is left as an exercise.



13.7 EXAMPLE: TREATMENTS ARE FIXED AND LOCATIONS

ARE RANDOM WITH A RCB AT EACH LOCATION

The data in Table 13.10 is from an experiment to evaluate the effect of three levels

of a compound (denoted by Drug) designed to promote faster growth of calves. A

diet with none of the drug was included as a control and used as a fourth level of

drug (0 mg/kg). The experiment involved six blocks of four pens of eight calves at

each of seven locations where the levels of the drug were randomly assigned to the

four pens within each block. The response variable was the average daily gain (ADG)



© 2002 by CRC Press LLC



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



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

6 EXAMPLE: TWO-WAY MIXED EFFECTS TREATMENT STRUCTURE IN A CRD

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

×