Tải bản đầy đủ - 0 (trang)
6 EXAMPLE: UNBALANCED ONE-WAY TREATMENT STRUCTURE

6 EXAMPLE: UNBALANCED ONE-WAY TREATMENT STRUCTURE

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

Random Effects Models with Covariates



19



TABLE 12.8

Data for Example in Section 12.6 with One-Way Random Effects Treatment

Structure (Cities) Where the Response Variable is the Amount Spent on

Vocational Training and the Covariate is the Percent Unemployment

City 1

Spent

27.9

43.0

26.0

34.4

43.4

42.4

27.9

25.9

23.3

34.3



Unemp

4.9

9.4

4.2

6.6

9.5

8.8

4.6

4.6

4.2

6.8



City 6

Spent

28.0

18.2

29.2

25.0

22.6

34.9

39.3

37.3

30.5



Unemp

6.3

2.6

6.7

5.4

3.8

8.4

9.8

9.1

6.8



City 2

Spent

29.6

12.7

19.9

12.3

23.8

28.8

21.0

13.9

13.2



Unemp

8.1

0.9

4.6

1.9

5.9

8.0

4.4

2.1

1.3



City 7

Spent

37.6

34.7

38.6

33.8

10.1

29.8

15.1

35.0



Unemp

9.9

8.8

9.9

8.2

0.1

7.0

1.8

8.5



City 3

Spent

17.5

21.2

19.0

14.5

25.2

15.0

24.6



Unemp

3.1

6.4

4.0

2.0

8.4

2.4

8.7



City 8

Spent

10.6

21.4

32.1

28.3

38.7

19.8

40.0

36.3

29.0



Unemp

0.0

3.4

7.0

5.8

9.2

2.7

9.7

8.2

5.9



City 4

Spent

28.0

16.0

16.8

26.5

23.1

18.0

17.8

11.6

24.2



Unemp

9.6

3.3

4.2

8.6

6.2

3.1

3.9

0.5

7.4



City 9

Spent

10.9

12.0

14.1

15.4

11.2

17.9

26.2

14.2

21.4



Unemp

2.9

2.8

3.6

5.2

1.4

5.6

10.0

3.6

7.2



City 5

Spent

22.0

22.6

12.8

11.8

23.5

26.0

24.5

18.8

11.2



Unemp

6.7

6.9

2.2

1.4

8.4

9.3

8.0

5.7

1.8



City 10

Spent

8.6

9.1

13.6

13.7

13.4

15.3

23.1

22.2



Unemp

0.8

0.7

3.4

3.1

3.6

4.4

7.8

7.4



to be spent on vocational training (y) and the possible covariate is the level of

unemployment (x). The PROC MIXED code to fit Model 12.1 is in Table 12.9 where

ˆ a2 = 2.5001 from UN(1,1), σ

ˆ b2 = 0.4187 from

the estimates of the parameters are σ

ˆ ε2 = 0.6832. The mixed models estimates

UN(2,2), σˆ ab = 0.3368 from UN(2,1), and σ

ˆ = 9.6299, βˆ = 2.3956, so the estimate

of the mean of the intercepts and slopes are α

of the population mean spent income on vocational training at a given level of

ˆ y|EMP = 9.6299 + 2.3956 UNEMP. The solution for the random

unemployment is µ

effects that satisfy the sum-to-zero restriction within the intercepts and within the

slopes are in Table 12.10. The estimate statements in Table 12.11 provide predicted

values (estimated BLUPS) for each of the selected cities evaluated at 10% unemployment. Table 12.11 contains the predicted values for each of the cities evaluated

at 0, 8, and 10%. Tables 12.12, 12.13, and 12.14 contain the PROC MIXED code

and results for fitting Model 12.1 where the values of the covariate have been altered

by subtracting 2, then mean (5.4195402) and 8 from the percent unemployment.

The estimate of the variance component for the intercepts depends on the amount

subtracted from the covariate as described in Section 12.4. When X0 is subtracted

© 2002 by CRC Press LLC



20



Analysis of Messy Data, Volume III: Analysis of Covariance



TABLE 12.9

PROC MIXED Code to Fit the Random Coefficients Model to the Vocational

Training Spending Data

PROC MIXED CL COVTEST DATA=CITY IC;

CLASS CITY;

MODEL Y=X/SOLUTION DDFM=KR;

RANDOM INT X/TYPE=UN SUB=CITY SOLUTION;

CovParm

UN(1,1)

UN(2,1)

UN(2,2)

Residual

Neg2LogLike

284.40

Effect

Intercept

X



Subject

CITY

CITY

CITY



Estimate

2.5001

0.3368

0.4187

0.6832



StdErr

1.3572

0.3910

0.2035

0.1180



ZValue

1.84

0.86

2.06

5.79



ProbZ

0.0327

0.3890

0.0198

0.0000



Alpha

0.05

0.05

0.05

0.05



Parameters

4



AIC

292.40



AICC

292.90



HQIC

291.07



BIC

293.61



CAIC

297.61



Estimate

9.6299

2.3956



StdErr

0.5401

0.2074



DF

9.2

8.9



tValue

17.83

11.55



Probt

0.0000

0.0000



Lower

1.0819

–0.4295

0.1944

0.5003



TABLE 12.10

Predicted Intercepts and Slopes for Each of the Cities

in the Study

Effect

Intercept

X

Intercept

X

Intercept

X

Intercept

X

Intercept

X

Intercept

X

Intercept

X

Intercept

X

Intercept

X

Intercept

X



© 2002 by CRC Press LLC



CITY

1

1

2

2

3

3

4

4

5

5

6

6

7

7

8

8

9

9

10

10



Estimate

0.9717

1.1022

–0.2659

0.0511

1.7366

–0.7753

0.8222

–0.5249

–1.0013

–0.4962

0.7862

0.5100

0.3338

0.4642

1.3563

0.6307

–2.3763

–0.5371

–2.3633

–0.4249



StdErrPred

0.8266

0.2280

0.6818

0.2249

0.7532

0.2282

0.7136

0.2225

0.7233

0.2215

0.8307

0.2271

0.7395

0.2180

0.7176

0.2201

0.7147

0.2260

0.6952

0.2290



df

23

13

19

12

22

13

21

12

21

11

24

13

22

11

21

11

21

12

20

13



tValue

1.18

4.83

–0.39

0.23

2.31

–3.40

1.15

–2.36

–1.38

–2.24

0.95

2.25

0.45

2.13

1.89

2.87

–3.33

–2.38

–3.40

–1.85



Probt

0.2516

0.0003

0.7009

0.8239

0.0308

0.0049

0.2624

0.0366

0.1807

0.0457

0.3535

0.0435

0.6561

0.0570

0.0727

0.0151

0.0033

0.0344

0.0029

0.0865



Upper

10.6709

1.1031

1.4648

0.9892



Random Effects Models with Covariates



21



TABLE 12.11

Estimate Statements Used to Provide Predicted Values for Each City at 10%

Unemployment with Predicted Values at 0, 8, and 10% Unemployment

estimate

estimate

estimate

estimate

estimate

estimate

estimate

estimate

estimate

estimate



‘city 1

‘city 2

‘city 3

‘city 4

‘city 5

‘city 6

‘city 7

‘city 8

‘city 9

‘city 10



at

at

at

at

at

at

at

at

at

at



10’

10’

10’

10’

10’

10’

10’

10’

10’

10’



intercept

intercept

intercept

intercept

intercept

intercept

intercept

intercept

intercept

intercept



1

1

1

1

1

1

1

1

1

1



x

x

x

x

x

x

x

x

x

x



10

10

10

10

10

10

10

10

10

10



|int

|int

|int

|int

|int

|int

|int

|int

|int

|int



At 0%

City

1

2

3

4

5

6

7

8

9

10



Estimate

10.6016

9.3641

11.3666

10.4522

8.6286

10.4162

9.9638

10.9862

7.2536

7.2667



1

1

1

1

1

1

1

1

1

1



x

x

x

x

x

x

x

x

x

x



10/subject

10/subject

10/subject

10/subject

10/subject

10/subject

10/subject

10/subject

10/subject

10/subject



1;

0 1;

0 0 1;

0 0 0 1;

0 0 0 0 1;

0 0 0 0 0 1;

0 0 0 0 0 0 1;

0 0 0 0 0 0 0 1;

0 0 0 0 0 0 0 0 1;

0 0 0 0 0 0 0 0 0 1;



At 10%

StdErr

0.7186

0.4799

0.6041

0.5370

0.5538

0.7246

0.5807

0.5438

0.5392

0.5048



Estimate

45.5793

33.8311

27.5696

29.1593

27.6221

39.4721

38.5619

41.2490

25.8383

26.9738



At 8%

StdErr

0.4894

0.6548

0.6448

0.5329

0.4907

0.4746

0.3932

0.4620

0.6225

0.7496



Estimate

38.5837

28.9377

24.3290

25.4178

23.8234

33.6609

32.8423

35.1964

22.1214

23.0324



StdErr

0.3255

0.4814

0.4650

0.3858

0.3561

0.3241

0.3091

0.3401

0.4469

0.5517



TABLE 12.12

PROC MIXED Code to Fit the Random Coefficients Model Using X2 = X – 2

as the Covariate

PROC MIXED CL COVTEST DATA=CITY IC;

CLASS CITY;

MODEL Y=X2 /SOLUTION DDFM=KR;

RANDOM INT X2/TYPE=UN SUB=CITY SOLUTION;

CovParm

UN(1,1)

UN(2,1)

UN(2,2)

Residual

Neg2LogLike

284.40

Effect

Intercept

X2



Subject

CITY

CITY

CITY



Estimate

5.5225

1.1742

0.4187

0.6832



StdErr

2.7060

0.6471

0.2034

0.1180



ZValue

2.04

1.81

2.06

5.79



ProbZ

0.0206

0.0696

0.0198

0.0000



Alpha

0.05

0.05

0.05

0.05



Parameters

4



AIC

292.40



AICC

292.90



HQIC

291.07



BIC

293.61



CAIC

297.61



Estimate

14.4211

2.3956



StdErr

0.7576

0.2074



DF

9.0

8.9



tValue

19.04

11.55



Probt

0.0000

0.0000



© 2002 by CRC Press LLC



Lower

2.5516

–0.0942

0.1944

0.5003



Upper

19.5882

2.4425

1.4648

0.9892



22



Analysis of Messy Data, Volume III: Analysis of Covariance



TABLE 12.13

PROC MIXED Code to Fit the Random Coefficients Model Using XMN = X –

5.4195402, the Mean of the X Values or Percent Unemployment Data

PROC MIXED CL COVTEST DATA=CITY IC;

CLASS CITY;

MODEL Y=XMN /SOLUTION DDFM=KR;

RANDOM INT XMN/TYPE=UN SUB=CITY SOLUTION;

CovParm

UN(1,1)

UN(2,1)

UN(2,2)

Residual

Neg2LogLike

284.40

Effect

Intercept

XMN



Subject

CITY

CITY

CITY



Estimate

18.4486

2.6059

0.4187

0.6832



StdErr

8.7381

1.2808

0.2034

0.1180



ZValue

2.11

2.03

2.06

5.79



ProbZ

0.0174

0.0419

0.0198

0.0000



Alpha

0.05

0.05

0.05

0.05



Parameters

4



AIC

292.40



AICC

292.90



HQIC

291.07



BIC

293.61



CAIC

297.61



Estimate

22.6128

2.3956



StdErr

1.3615

0.2074



DF

9.0

8.9



tValue

16.61

11.55



Probt

0.0000

0.0000



Lower

8.7033

0.0956

0.1944

0.5003



Upper

61.9455

5.1162

1.4648

0.9892



TABLE 12.14

PROC MIXED Code to Fit the Random Coefficients Model Using X8 = X – 8

as the Covariate

PROC MIXED CL COVTEST DATA=CITY IC;

CLASS CITY;

MODEL Y=X8 /SOLUTION DDFM=KR;

RANDOM INT X8/TYPE=UN SUB=CITY SOLUTION;

CovParm

UN(1,1)

UN(2,1)

UN(2,2)

Residual

Neg2LogLike

284.40

Effect

Intercept

X8



Subject

CITY

CITY

CITY



Estimate

34.6853

3.6863

0.4187

0.6832



StdErr

16.4247

1.7897

0.2034

0.1180



ZValue

2.11

2.06

2.06

5.79



ProbZ

0.0174

0.0394

0.0198

0.0000



Alpha

0.05

0.05

0.05

0.05



Parameters

4



AIC

292.40



AICC

292.90



HQIC

291.07



BIC

293.61



CAIC

297.61



Estimate

28.7945

2.3956



StdErr

1.8670

0.2074



DF

9.0

8.9



tValue

15.42

11.55



Probt

0.0000

0.0000



Lower

16.3654

0.1785

0.1944

0.5003



Upper

116.4205

7.1941

1.4648

0.9892



from X, the resulting variance component is related to the variance of the models

evaluated at X0. Table 12.15 contains the estimates of the variance components for

the intercepts evaluated at X = 0, 2, 5.4195402, and 8 obtained from Tables 12.9,

12.12, 12.13, and 12.14 as well as the sample variance of the predicted values at

each of those values of X. The variance at X = 0 is the variance of the intercept

© 2002 by CRC Press LLC



Random Effects Models with Covariates



23



TABLE 12.15

Estimates of the Intercept Variance Components and the

Variance of the Predicted Values at Four Values of X

Amount Subtracted

from X

0

2

5.4195402

8



Estimate of the Intercept

Variance Component

2.5001

5.5225

18.4486

34.6853



Variance of the

Predicted Values

2.1678

5.3460

18.3628

34.5209



predictions from Table 12.10. The variance at X = 8 is the variance of the predicted

values from Table 12.11. The sample variances of the predicted values are not quite

equal to the REML estimates of the variance components since the sample variances

do not take into account the number of other parameters being estimated in the

models. However, the estimates of the variance components of the models evaluated

at a given value of X are predictable using the results from Section 12.4. In this

case, using the estimates of the variance components from Table 12.9, the estimate

of the variance component for the intercepts at X = 8 is computed as

σˆ a2* = σˆ a2 + 2 × 8 × σˆ ab + 82 × σˆ b2

= 2.5001 + 2 × 8 × 0.3368 + 82 × 0.4187

= 34.6853

where a* denotes the intercepts of the models with the covariate taking on the values

of X – 8. The REML estimates of variance components for the slopes [UN(2,2)] and

residual are the same in all four of the analyses: Tables 12.9, 12.12, 12.13, and 12.14.

Using the results in Section 12.2, a prediction band can be constructed about the

population of regression models. Table 12.16 contains the estimates of the amount to

be spent on vocational training from the estimated population regression model at 0,

1, …,10% unemployment. The estimated standard error of prediction at each of the

values of x and the simultaneous lower and upper 95% prediction intervals are also

included in Table 12.16. The Scheffé percentage point used was 2 F 0.05, 2, 70 = 2.50.

Figure 12.4 is a graph of the ten predicted regression lines, the mean and the upper

and lower prediction limits over the range of 0 to 10% unemployment. The graph

clearly shows that as the percent of unemployment increases, the width of the

prediction interval also increases. The next section applies the analysis to a two-way

random effects treatment structure.



12.7 EXAMPLE: TWO-WAY TREATMENT STRUCTURE

Three genetic lines of Hereford cattle were randomly selected from a population of

Hereford cattle producers, and three genetic lines of Black Angus cattle were randomly

© 2002 by CRC Press LLC



24



Analysis of Messy Data, Volume III: Analysis of Covariance



TABLE 12.16

The Mean, Estimated Standard Error

of Prediction, and Lower and Upper

Prediction Intervals for Selected

Values of X (% Unemployment)

x

0

1

2

3

4

5

6

7

8

9

10



mean

9.63

12.03

14.42

16.82

19.21

21.61

24.00

26.40

28.79

31.19

33.59



se

1.78

2.07

2.49

3.00

3.55

4.13

4.72

5.33

5.95

6.57

7.20



low

5.17

6.85

8.19

9.32

10.34

11.29

12.19

13.07

13.92

14.76

15.59



up

14.09

17.20

20.65

24.31

28.08

31.93

35.81

39.73

43.67

47.62

51.58



Random Coefficient Models for Cities

60



Income ($1000)



50

40

30

20

10

0

0



1



2



3



4



5



6



7



8



9



10



Unemployment %

7



1

8



2

9



3

10



4

L



5

M



6

U



FIGURE 12.4 Graph of the predicted models for each city with the lower (L) and upper (U)

prediction band and the mean (M) of the regression model.



selected from a population of Black Angus cattle producers. The set of three genetic

lines from each population is not a large enough sample to provide reliable estimates

of the variance components in a genetic study, but the smaller number was used for

© 2002 by CRC Press LLC



Random Effects Models with Covariates



25



demonstration purposes. Cows (20) from each line of the Hereford cattle were

crossed with bulls from each line of the Black Angus, and 20 cows from each line

of Black Angus cattle were crossed with bulls from each line of Hereford. Thus,

there were 180 cows in the study where each cow gave birth to 1 calf. Five pastures

(denoted as Rep) were used for the study where 36 cows with calves were put into

each pasture where there were 4 cows and calves from each of the 9 crosses. The

response variable was the weight of the calf at weaning time and the birth weight

was considered as a possible covariate. Table 12.17 contains the data where Rep

represents the pasture and (yij, xij) represent the weaning weight and the birth weight,

respectively, for the ijth cross.

The two-way random coefficient model of Equation 12.5 was to be fit to the

data set. The PROC MIXED code in Table 12.18 fits Model 12.5 where all of the

covariances between the slopes and intercepts for each set are zero, “a” denotes

Hereford, “b” denotes Black Angus, y denotes the weaning weight and x denotes

the birth weight. In this analysis, method = type3 was used to provide method of

moments estimates of the variance components using type III sums of squares. This

option causes PROC MIXED to compute sums of squares, mean squares, expected

mean squares, appropriate error terms (Milliken and Johnson, 1992), approximate

error degrees of freedom, and F-statistics to test a hypothesis about each of the

effects in the model. Using the parameters in the description of Model 12.5, source

“a” tests H0: σ a2 = 0 vs Ha: σ2a > 0, source “x*a” tests H0: σ 2b = 0 vs. Ha: σb2 > 0,

source “b” tests H0: σc2 = 0 vs. Ha: σc2 > 0, source “x*b” tests H0: σd2 = 0 vs. Ha:

σd2 > 0, source “a*b” tests H0: σf2 = 0 vs. Ha: σf2 > 0, and source “x*a*b” tests H0:

σg2 = 0 vs. Ha: σg2 > 0. The results indicate that all of the variance components are

important except σa2 (source a or Hereford) and σ c2 (source b or Black Angus) with

significance levels of 0.1565 and 0.2140, respectively. The method of moments

estimates of the variance components are in Table 12.19 as well as the estimates of

the population intercept (230.2420) and slope (0.6281).

Based on the results of Section 12.4, the interpretations of the variance components σa2, σc2, and σf2 are that they represent the variation of the intercepts of the

regression models or the variation of the predicted models evaluated at X = 0 or at

a birth weight of 0, a place that is not meaningful to compare the regression models.

The researcher wanted to evaluate the variance components of the intercepts at a

birth weight of 75 pounds so a new covariate was computed as x75 = x – 75. The

PROC MIXED code in Table 12.20 fits the independent slopes and intercepts model

using x75 as the covariate. The sums of squares and tests for all terms involving

x75 provides identical values as those same terms in Table 12.18. The sums of

squares and tests for a, b, and a*b have changed as they are evaluating the variance

components of the new intercepts or the models evaluated at x = 75. At x = 75, the

significance levels corresponding to sources a , b, and a*b are 0.0569, 0.1039, and

0.000, respectively. The method of moments estimates of the variance components

are in Table 12.21. The estimates of the three variance components corresponding

ˆ a2 = 217.3864, σ

ˆ c2 = 129.4336, and σ

ˆ f2 = 121.1095. These

to the models at x = 75 are σ

variance components are much larger than those obtained for the models evaluated

at x = 0. The next step is to fit the correlated slopes and intercepts model to the

data. Table 12.22 contains the PROC MIXED code to fit the correlated slopes and

© 2002 by CRC Press LLC



26



TABLE 12.17

Weights of Calves at Weaning (yij ) and Birth Weights (xij ) of Crosses of the ith Hereford Genetic Line with

the jth Black Angus Genetic Line

y11

283

258

285

270

273

285

279

295

243

244

258

247

283

260

270

259

252

270

269

280



x11

94

53

96

71

63

83

71

98

63

65

90

70

88

53

69

50

51

82

80

99



© 2002 by CRC Press LLC



y12

262

248

252

261

264

270

273

268

237

241

241

240

263

252

264

261

254

257

247

249



x12

92

53

64

88

71

87

97

83

83

92

94

91

88

58

92

84

87

91

64

72



y13

261

258

272

263

285

286

267

278

244

255

236

239

273

267

266

274

259

264

269

257



x13

58

52

85

63

95

98

52

78

71

98

53

60

83

69

64

85

68

79

91

64



y21

304

293

311

303

293

287

286

288

261

283

281

283

281

287

310

290

309

306

287

299



x21

86

72

96

88

61

55

54

56

61

88

85

88

56

64

91

67

100

96

73

87



y22

280

259

271

279

285

287

279

273

241

250

254

237

266

274

261

277

254

270

260

262



x22

100

53

80

96

89

96

77

63

61

80

89

55

63

81

53

87

57

91

67

72



y23

283

266

270

264

294

277

286

273

264

245

247

254

282

283

277

284

266

275

272

278



x23

94

59

66

55

97

64

83

57

99

60

64

79

86

89

77

91

71

89

82

94



y31

334

336

344

302

345

321

331

319

320

300

303

312

329

321

337

337

318

324

343

313



x31

86

88

94

57

88

67

76

66

93

76

78

86

80

73

86

87

78

83

99

73



y32

282

281

288

297

308

287

315

319

266

283

285

288

294

292

291

291

298

301

294

286



x32

58

57

65

77

80

54

88

94

65

86

89

92

71

67

67

68

86

90

80

71



y33

278

280

278

275

295

276

272

273

252

266

263

246

269

278

288

291

268

258

282

269



x33

77

82

79

73

94

58

50

53

70

96

90

59

56

74

92

98

71

54

97

72



Analysis of Messy Data, Volume III: Analysis of Covariance



Rep

1

1

1

1

2

2

2

2

3

3

3

3

4

4

4

4

5

5

5

5



Random Effects Models with Covariates



27



TABLE 12.18

PROC MIXED Code to Fit the Independent Slope and Intercept Model Using

Type III Sums of Squares with Expected Mean Squares and Error Terms

proc mixed scoring=2 data=twoway method=type3;

class rep a b;

model y=x/solution ddfm=kr;

random rep a x*a b x*b a*b x*a*b;

Source

x



df

1



SS

12837.5138



MS

12837.5138



rep

a

x*a

b

x*b

a*b

x*a*b

Residual



4

2

2

2

2

4

4

158



18310.2743

25.8699

686.0917

19.7484

811.8033

17.2849

212.1297

41.8099



4577.5686

12.9349

343.0459

9.8742

405.9017

4.3212

53.0324

0.2646



Source

x



ErrorDF

3.4



FValue

18.55



ProbF

0.0176



rep

a

x*a

b

x*b

a*b

x*a*b



158.0

4.0

4.0

4.0

4.0

158.0

158.0



17298.68

3.07

6.58

2.40

7.99

16.33

200.41



0.0000

0.1552

0.0543

0.2063

0.0400

0.0000

0.0000



EMS

Var(Residual) + 3616.3 Var(x*a*b) + 10849 Var(x*b) +

10849 Var(x*a) + Q(x)

Var(Residual) + 34.044 Var(rep)

Var(Residual) + 0.6016 Var(a*b) + 1.8047 Var(a)

Var(Residual) + 3696.7 Var(x*a*b) + 11090 Var(x*a)

Var(Residual) + 0.5877 Var(a*b) + 1.763 Var(b)

Var(Residual) + 3601.7 Var(x*a*b) + 10805 Var(x*b)

Var(Residual) + 0.6183 Var(a*b)

Var(Residual) + 3762.7 Var(x*a*b)

Var(Residual)

ErrorTerm

0.9783 MS(x*a) + 1.0041 MS(x*b) – 0.9611

MS(x*a*b) – 0.0212 MS(Residual)

MS(Residual)

0.9729 MS(a*b) + 0.0271 MS(Residual)

0.9825 MS(x*a*b) + 0.0175 MS(Residual)

0.9505 MS(a*b) + 0.0495 MS(Residual)

0.9572 MS(x*a*b) + 0.0428 MS(Residual)

MS(Residual)

MS(Residual)



intercepts model where four random statements are needed to complete the model

specification. The statement “random rep;” specifies that the replications or

pastures are a random effect. The statement “random int x75/type = un

subject = a solution;” specifies covariance structure for the intercepts and

slopes for the main effect of a or Hereford genetic lines. The statement “random

int x75/type = un subject = b solution;” specifies covariance structure

for the intercepts and slopes for the main effect of b or Black Angus genetic lines.

The statement “random int x75/type = un subject = a*b solution;”

specifies covariance structure for the intercepts and slopes for the interaction between

the levels of a and the levels of b or a cross between a Hereford line and a Black

Angus line. PROC MIXED would not fit this model without including some initial

values for the variance components. The estimates of the variance components

obtained from the uncorrelated model in Table 12.21 were used as starting values

where “0” was inserted in place of the covariances of the slopes and intercepts for

the main effect of a, for the main effect of b, and for the interaction of a and b.



© 2002 by CRC Press LLC



28



Analysis of Messy Data, Volume III: Analysis of Covariance



TABLE 12.19

Method of Moments Estimates of the Variance Components

and Resulting Estimates and Tests of the Fixed Effects

CovParm

rep

a

x*a

b

x*b

a*b

x*a*b

Residual



Estimate

134.4528

4.8338

0.0262

3.2637

0.0329

6.5611

0.0140

0.2646



Effect

Intercept

x



Estimate

230.2420

0.6281



StdErr

5.5108

0.1458



df

5.0

3.9



tValue

41.78

4.31



Effect

x



NumDF

1



DenDF

3.9



FValue

18.55



ProbF

0.0131



Probt

0.0000

0.0131



These starting values are included in the “Parameters” statement in Table 12.22.

Table 12.22 contains the REML estimates of the variance components, which are

similar to those obtained from the method of moments, but not identical since covariances of the slopes and intercepts were also estimated. The REML estimates of the

three variance components from the correlated slopes and intercepts structure corresponding to the models evaluated at x = 75 are σˆ a2 = 225.0213 (from U(1,1) for subject =

a), σˆ c2 = 132.7903 (from UN(1,1) for subject = b), and σˆ f2 = 119.1411 (from UN(1,1)

for subject = a*b). These are the important variance components to be used in any

genetic analysis of this data set (no genetic analysis is included here). Table 12.23

contains the predicted values for the slopes (x75) and the models at X = 75 (Intercept)

where each set satisfies the sum to zero restriction within each type of effect. These

predicted values can be used to obtain the predicted slope and intercept for each level

of a (Hereford), for each level of b (Black Angus), and for each combination of levels

of a and b (crosses of Hereford and Black Angus). The predicted intercept for the first

Hereford genetic line is âp a1 = αˆ + âa1 = 277.3511 – 11.9311 = 265.4200 and the

predicted slope is bˆ p a1 = βˆ + bˆ a1 = 0.6275 – 0.1312 = 0.4963. The predicted model

ˆ p a = 265.42 + .4963 (birth wt – 75). Figure 12.5

for the first Hereford genetic is wt

1

is a graph of the three predicted models for the three Hereford genetic lines. Similar

models can be constructed for the three Black Angus genetic lines, and those

predicted models are displayed in Figure 12.6. The predicted slope and intercept for

a cross of the first Hereford genetic line and the first Black Angus genetic line is

bˆ p a11 = βˆ + bˆ a1 + bˆ b1 + bˆ ab1 = 0.6275 – 0.1312 + 0.1862 – 0.0793 = 0.6032 and

ˆ + âa1 + âb1 + âab1 = 277.3511 – 11.9311 + 11.3392 – 8.2703 = 268.4889.

âp ab11 = α

ˆ p ab11 = 268.4889 + 0.6032 (birth wt –

Thus, the model for the (1,1) combination is wt

75). The nine predicted regression lines for the Hereford and Black Angus crosses

are displayed in Figure 12.7.

© 2002 by CRC Press LLC



Random Effects Models with Covariates



29



TABLE 12.20

PROC MIXED Code to Fit the Independent Slope and Intercept Model with

x75 = x – 75 as the Covariate Using Type III Sums of Squares with Expected

Mean Squares and Error Terms

proc mixed scoring=2 data=twoway method=type3;

class rep a b;

model y=x75/solution ddfm=kr;

random rep a x75*a b x75*b a*b x75*a*b;

Source

x75



df

1



SS

12837.5138



MS

12837.5138



rep

a

x75*a



4

2

2



18310.2743

28862.0375

686.0917



4577.5686

14431.0187

343.0459



b

x75*b



2

2



19003.6174

811.8033



9501.8087

405.9017



a*b

x75*a*b

Residual



4

4

158



9067.4377

212.1297

41.8099



2266.8594

53.0324

0.2646



Source

x75



ErrorDF

3.4



FValue

18.55



ProbF

0.0176



rep

a

x75*a

b

x75*b

a*b

x75*a*b



158.0

4.0

4.0

4.0

4.0

158.0

158.0



17298.68

6.38

6.58

4.21

7.99

8566.49

200.41



0.0000

0.0569

0.0543

0.1039

0.0400

0.0000

0.0000



EMS

Var(Residual) + 3616.3 Var(x75*a*b) + 10849

Var(x75*b) + 10849 Var(x75*a) + Q(x75)

Var(Residual) + 34.044 Var(rep)

Var(Residual) + 18.662 Var(a*b) + 55.986 Var(a)

Var(Residual) + 3696.7 Var(x75*a*b) + 11090

Var(x75*a)

Var(Residual) + 18.652 Var(a*b) + 55.956 Var(b)

Var(Residual) + 3601.7 Var(x75*a*b) + 10805

Var(x75*b)

Var(Residual) + 18.715 Var(a*b)

Var(Residual) + 3762.7 Var(x75*a*b)

Var(Residual)

ErrorTerm

0.9783 MS(x75*a) + 1.0041 MS(x75*b) – 0.9611

MS(x75*a*b) – 0.0212 MS(Residual)

MS(Residual)

0.9972 MS(a*b) + 0.0028 MS(Residual)

0.9825 MS(x75*a*b) + 0.0175 MS(Residual)

0.9966 MS(a*b) + 0.0034 MS(Residual)

0.9572 MS(x75*a*b) + 0.0428 MS(Residual)

MS(Residual)

MS(Residual)



12.8 SUMMARY

Random effects treatment structures with covariates provides the usual random

coefficient regression model. The strategy of determining the simplest covariate part

of the model is applied here as one would for a fixed effects treatment structure,

except we are looking for variance and covariance components which help describe

the data instead of regression models. Predictions of the coefficients for a family of

regression models can be obtained and for some cases it might be important to obtain

the BLUP of the model for a specific level of the random effect and to compare

BLUPs for two or more specific levels of the random effect. It is also important to

evaluate the intercept variance components at values of the covariates that are

important to the study. The default is to provide estimates of the variance components

for the intercepts of the models, which may not be meaningful.

© 2002 by CRC Press LLC



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

6 EXAMPLE: UNBALANCED ONE-WAY TREATMENT STRUCTURE

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

×