Tải bản đầy đủ - 0 (trang)
8 EXAMPLE: FOUR TREATMENTS IN RCB

8 EXAMPLE: FOUR TREATMENTS IN RCB

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

12



Analysis of Messy Data, Volume III: Analysis of Covariance



TABLE 11.8

Least Squares Means and Comparisons at x = 26.98 (Mean), 15, 20, 25, 30,

35, and 40

lsmeans

lsmeans

lsmeans

lsmeans

lsmeans

lsmeans

lsmeans



treat/diff

treat/diff

treat/diff

treat/diff

treat/diff

treat/diff

treat/diff



TREAT

1

2

1

2

1

2

1

2

1

2

1

2

1

2



X

26.98

26.98

15

15

20

20

25

25

30

30

35

35

40

40



TREAT

1

1

1

1

1

1

1



_TREAT

2

2

2

2

2

2

2



at

at

at

at

at

at

at



means;

x=15;

x=20;

x=25;

x=30;

x=35;

x=40;



Estimate

65.5875

80.0375

50.8673

59.6062

57.0135

68.1370

63.1597

76.6678

69.3060

85.1986

75.4522

93.7294

81.5985

102.2602

X

26.98

15

20

25

30

35

40



StdErr

1.8205

1.8205

4.3747

4.3747

2.9466

2.9466

1.9351

1.9351

2.0794

2.0794

3.2281

3.2281

4.6941

4.6941



df

6

6

6

6

6

6

6

6

6

6

6

6

6

6



tValue

36.03

43.96

11.63

13.63

19.35

23.12

32.64

39.62

33.33

40.97

23.37

29.04

17.38

21.78



Probt

0.0000

0.0000

0.0000

0.0000

0.0000

0.0000

0.0000

0.0000

0.0000

0.0000

0.0000

0.0000

0.0000

0.0000



Estimate

–14.4500

–8.7390

–11.1235

–13.5081

–15.8927

–18.2772

–20.6618



StdErr

0.7262

1.7450

1.1754

0.7719

0.8294

1.2876

1.8724



df

6

6

6

6

6

6

6



tValue

–19.90

–5.01

–9.46

–17.50

–19.16

–14.19

–11.04



Probt

0.0000

0.0024

0.0001

0.0000

0.0000

0.0000

0.0000



The model assuming there is a linear relationship between ADG and WT is

ADG ij = α i + βi WTj + b j + ε ij .



(11.10)



The within block analysis provides estimates of the contrasts of the αi’s and contrasts

of the βi’s. Table 11.11 contains the PROC GLM code to extract the within block

information. The results are in Tables 11.11 and 11.12 which includes that partition

of (X.X)– and parameter estimates corresponding to the α’s and β’s. The solutions

ˆ i’s and βˆ i’s satisfy the set-to-zero restrictions. The sum of squares correfor the α

sponding to wt*Ration tests the equal slopes hypothesis (df = 3) instead of testing



© 2002 by CRC Press LLC



Covariate Measured on the Block in RCB



13



TABLE 11.9

PROC MIXED Code and Analysis of Variance without the Covariate

proc mixed cl covtest data=III117;

class blk treat;

model yield=treat/solution;

lsmeans treat/diff;

random blk;

CovParm

BLK

Residual



Estimate

92.9077

5.7114



StdErr

51.2104

3.0529



ZValue

1.81

1.87



ProbZ

0.0348

0.0307



Alpha

0.05

0.05



Lower

39.8015

2.4968



Effect

TREAT



NumDF

1



DenDF

7



FValue

146.23



ProbF

0.0000



Effect

TREAT

TREAT



TREAT

1

2



Estimate

65.5875

80.0375



StdErr

3.5110

3.5110



df

7

7



tValue

18.68

22.80



Probt

0.0000

0.0000



Effect

TREAT



TREAT

1



_TREAT

2



Estimate

–14.5500



StdErr

1.1949



df

7



tValue

–12.09



Upper

408.7899

23.6586



Probt

0.0000



TABLE 11.10

Data for Example in Section 11.8

blk

1

2

3

4

5

6

7

8

9

10

11

12



wt

0.51

0.52

0.54

0.55

0.57

0.59

0.61

0.62

0.64

0.65

0.67

0.69



ration1

2.19

2.11

2.06

1.70

2.00

2.59

2.06

1.91

1.98

1.73

1.80

2.37



ration2

2.44

2.47

2.28

1.91

1.99

2.59

2.34

1.99

2.06

1.72

1.86

2.12



ration3

3.02

3.01

2.82

2.60

2.42

3.37

3.16

2.62

2.96

2.65

2.81

2.99



ration4

2.66

2.96

2.36

2.35

2.22

2.90

2.59

2.29

2.39

2.26

2.10

2.41



Note: Rationi corresponds to the average daily gain for the

ith ration and wt is initial weight in pounds divided by 1000.



the slopes equal to zero hypothesis (df = 4). The significance level corresponding

to the equal slopes hypothesis is 0.0052, indicating there is sufficient evidence to

conclude the slopes are not equal. The least squares means were requested at the



© 2002 by CRC Press LLC



14



Analysis of Messy Data, Volume III: Analysis of Covariance



TABLE 11.11

PROC GLM Code and Within Block Analysis

for Data of Section 11.8

proc glm data=III118;

class blk ration;

model adg=blk ration wt*ration/solution i;

random blk/test;

Source

Model

Error

Corrected Total



df

17

30

47



SS

7.7508

0.3429

8.0936



MS

0.4559

0.0114



FValue

39.89



ProbF

0.0000



Source

blk

Ration

wt*Ration



df

11

3

3



SS (I)

2.6066

4.9657

0.1785



MS

0.2370

1.6552

0.0595



FValue

20.73

144.84

5.21



ProbF

0.0000

0.0000

0.0052



Source

blk

Ration

wt*Ration



df

10

3

3



SS (III)

2.2988

0.1585

0.1785



MS

0.2299

0.0528

0.0595



FValue

20.12

4.62

5.21



ProbF

0.0000

0.0090

0.0052



mean of the wt values and at wt = 0.510 and 0.680. Only the adjusted means at the

mean of the wt values (0.596) are estimable and are provided in Table 11.13.

The block sum or total model is

ADG. j = α. + β.WTj + e j



(11.11)



where ej = 4bj + ε.j ~ N(0, 4(σ ε2 + 4σ 2b )), which is a simple linear regression model.

The block total data are in Table 11.14 (note that model depends on WT not 4*WT)

and the PROC REG code to fit the blocked total model is in Table 11.15. This

ˆ = 12.7662, βˆ . = –5.4521

analysis provides estimates of α., β. and 4(σ ε2 + 4σ 2b ) as α

2

2

–1

and 4(σ ε + 4σ b ) = 0.9195. The X′′ X matrix is also included in Table 11.15. Using

the between block and the within block information, combined estimators of the

slopes and intercepts can be computed using the process outlined in Chapter 10.

The next step is to combine the within block information and between block information. The vector of parameters to be estimate is



(



)′



␪ = α., β., α 1 − α., α 2 − α., α 3 − α., α 4 − α., β1 − β., β 2 − β., β 3 − β., β 4 − β.



(11.12)



␪1* = (α 1 − α 4 , α 2 − α 4 , α 3 − α 4 , α 4 − α 4 , β1 − β 4 , β 2 − β 4 , β 3 − β 4 , β 4 − β 4 )′



(11.13)



Let



© 2002 by CRC Press LLC



Parameter

Ration 1

Ration 2

Ration 3

Ration 4

wt*Ration 1

wt*Ration 2

wt*Ration 3

wt*Ration 4



Ration_1

17.332451

8.666225

8.666225

0.000000

–28.793599

–14.396799

–14.396799

0.000000



Ration_2

8.666225

17.332451

8.666225

0.000000

–14.396799

–28.793599

–14.396799

0.000000



Ration_3

8.666225

8.666225

17.332451

0.000000

–14.396799

–14.396799

–28.793599

0.000000



Ration_

4

0.000000

0.000000

0.000000

0.000000

0.000000

0.000000

0.000000

0.000000



Parameter

Ration 1

Ration 2

Ration 3

Ration 4

wt*Ration 1

wt*Ration 2

wt*Ration 3

wt*Ration 4



Estimate

–1.4789

–0.1669

–0.8355

0.0000

1.7832

–0.2400

2.0919

0.0000



StdErr

0.4451

0.4451

0.4451



tValue

–3.32

–0.37

–1.88



Probt

0.0024

0.7103

0.0702



0.7429

0.7429

0.7429



2.40

–0.32

2.82



0.0228

0.7489

0.0085



wt_Ration_1

–28.793599

–14.396799

–14.396799

0.000000

48.297901

24.148951

24.148951

0.000000



wt_Ration_2

–14.396799

–28.793599

–14.396799

0.000000

24.148951

48.297901

24.148951

0.000000



wt_Ration_3

–14.396799

–14.396799

–28.793599

0.000000

24.148951

24.148951

48.297901

0.000000



wt_Ration_4

0.000000

0.000000

0.000000

0.000000

0.000000

0.000000

0.000000

0.000000



Covariate Measured on the Block in RCB



TABLE 11.12

Partition of Inverse of X′ X Corresponding to the Intercepts and Slopes and Within Block Estimates

of the Slopes and Intercepts for the Data of Section 11.8



15



© 2002 by CRC Press LLC



16



Analysis of Messy Data, Volume III: Analysis of Covariance



TABLE 11.13

Least Squares Means and Comparisons at the

Mean Value of wt (0.596) as Others are Not

Estimable from the Within Block Information

lsmeans ration/pdiff at means stderr;

lsmeans ration/pdiff at wt=.510 stderr;

lsmeans ration/pdiff at wt=.680 stderr;

Ration

1

2

3

4

RowName

1

2

3

4



LSMean

2.0417

2.1475

2.8692

2.4575



StdErr

0.0309

0.0309

0.0309

0.0309



Probt

0.0000

0.0000

0.0000

0.0000



LSMean#

1

2

3

4



_1



_2

0.0215



_3

0.0000

0.0000



_4

0.0000

0.0000

0.0000



0.0215

0.0000

0.0000



0.0000

0.0000



0.0000



TABLE 11.14

Sums of the ADG Values within

Each of the Blocks, Information

for the Between Block Analysis

BLK

1

2

3

4

5

6

7

8

9

10

11

12



sADG

10.31

10.55

9.52

8.56

8.63

11.45

10.15

8.81

9.39

8.36

8.57

9.89



mWT

0.505

0.520

0.539

0.551

0.569

0.585

0.606

0.619

0.640

0.654

0.674

0.692



denote the parameter estimated by the set to zero restriction solution. Convert ␪*1 to

a sum-to-zero restriction ␪1 by ␪1 = T1 ␪*1 where

I − 1 J

 4 4 4

T1 = 

0





© 2002 by CRC Press LLC







1 

I4 − J4 

4 

0



Covariate Measured on the Block in RCB



17



TABLE 11.15

PROC REG Code and Between Block Analysis with the Inverse

of X′ X and the Parameter Estimates

proc reg data=blktotal;

model sadg=mwt/xpx i;

Variable

Intercept

mWT



Intercept

8.666225278

–14.3967995



mWT

–14.3967995

24.14895073



Source

Model

Error

Corrected Total



df

1

10

11



SS

1.2309

9.1954

10.4263



MS

1.2309

0.9195



FValue

1.34



ProbF

0.2742



Variable

Intercept

mWT



df

1

1



Estimate

12.7662

–5.4521



StdErr

2.8229

4.7123



tValue

4.52

–1.16



Probt

0.0011

0.2742



(



)





and ␪1 = α1 − α., α 2 − α., α 3 − α., α 4 − α., β1 − β., β2 − β., β3 − β., β 4 − β. ,

The beta-hat model relating ␪ˆ to ␪ is

1



␪ˆ 1 = H1␪ + e1



(11.14)



where

0

0



0



0

H1 = 

0



0

0



0



0

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

1

0

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

1

0

0



0

0

0

0

0

0

1

0



0

0



0



0

0



0

0



1 



(11.15)



with Var(e1) = Σˆ 2.

The between

block information estimates θ 2* = (α., β.) ′ which can be transformed





to ␪2 = (α., β.)′ by ␪2 = T2 where T2 = (1/4)I2.

The beta-hat model relating ␪ˆ 2 to ␪ is ␪ˆ 2 = H2␪ + e2 where

1

H2 = 

0

and Var(e2) = Σˆ b.

© 2002 by CRC Press LLC



0

1



0

0



0

0



0

0



0

0



0

0



0

0



0

0



0

0 



18



Analysis of Messy Data, Volume III: Analysis of Covariance



The two beta-hat models are combined as



␪ˆ 1

␪ˆ 2



=



H1

H2



␪+



 e 1

 e 2



and the results in



Section 11.3 are applied to provide the combined estimate of ␪ and its corresponding

estimated covariance matrix. In this chapter the combining process is accomplished

by using the mixed models approach. The intercepts and slopes are computed as

αˆ

βˆ



= H0 ␪ˆ where



1

1



1



1

H=

0



0

0



0



0

0

0

0

1

1

1

1



1

0

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

1

0

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

1

0



0

0



0



0

0



0

0



1 



(11.16)



The adjusted mean for, say, ration 1 at X = X0 is µˆ 1|X0 = a′X0␪ˆ where a′X0 = (1 X0

1 0 0 0 X0 0 0 0) and differences between, say rations 1 and 2 at X = Xo is µˆ 1|X0 –

µˆ 2|X0 = b′X0␪ˆ where b′X0 = (0 0 1 –1 0 0 X0 –X0 0 0).

In this chapter the combining process is accomplished by using the mixed models

approach. The PROC MIXED code in Table 11.16 fits the unequal slopes model to

the data set with contrast statements to provide tests of the equal slopes and of the

equal intercepts hypotheses. Since the results in Table 11.16 are based on combined

estimators, the Kenward-Roger adjustment to the denominator of freedom was used

(Kenward and Roger, 1997). The lower partition of Table 11.16 contains the combined estimates of the intercepts and slopes of the four regression models. The

F-statistic corresponding to wt*Ration tests the slopes equal to zero hypothesis and

the contrast with label “b1 = b2 = b3 = b4” tests the equal slopes hypotheses. There

is sufficient information to reject both hypotheses as the significance levels are

0.0095 and 0.0052, respectively. The least squares means evaluated at wt = 0.596,

0.510, and 0.680 are included in Table 11.17 where the lower part of the table

contains the pairwise comparisons of the ration means within each level of wt. All

adjusted means within a value of wt are significantly different (p ≤ 0.05) except for

rations 1 and 2 at wt = 0.680 which has a significance level of 0.4083. Finally,

Table 11.18 contains the PROC MIXED code to carry out an analysis of variance

on the data set. The estimate of the blk variance component is 0.0553 for the analysis

of variance and is 0.0546 when the covariate is taken into account. The least squares

means in the fourth partition of Table 11.18 are identical to the least squares means

in Table 11.17 evaluated at wt = 0.596. The analysis of covariance has smaller

estimated standard errors for the least squares means and for the comparison of the

least squares means. The analysis of covariance is providing additional information



© 2002 by CRC Press LLC



Covariate Measured on the Block in RCB



19



TABLE 11.16

PROC MIXED Code and Combined Within-Between Block Analysis with

Parameter Estimates for the Unequal Slopes Model

proc mixed cl covtest data=III118;

class blk ration;

model adg=ration wt*ration/solution noint ddfm=kr;

contrast ‘a1=a2=a3=a4’ ration 1 –1, ration 1 0 –1, ration 1 0 0 –1;

contrast ‘b1=b2=b3=b4’ wt*ration 1 –1, wt*ration 1 0 –1,

wt*ration 1 0 0 –1;

random blk;

CovParm

blk

Residual



Estimate

0.0546

0.0114



StdErr

0.0257

0.0030



ZValue

2.12

3.87



ProbZ

0.0168

0.0001



Effect

Ration

wt*Ration



NumDF

4

4



DenDF

28.6

28.6



FValue

8.30

4.10



ProbF

0.0001

0.0095



Label

a1=a2=a3=a4

b1=b2=b3=b4



NumDF

3

3



DenDF

30

30



FValue

4.62

5.21



ProbF

0.0090

0.0052



Ration

1

2

3

4

1

2

3

4



Estimate

2.3330

3.6450

2.9764

3.8119

–0.4886

–2.5119

–0.1799

–2.2718



StdErr

0.7565

0.7565

0.7565

0.7565

1.2629

1.2629

1.2629

1.2629



df

13.1

13.1

13.1

13.1

13.1

13.1

13.1

13.1



Effect

Ration

Ration

Ration

Ration

wt*Ration

wt*Ration

wt*Ration

wt*Ration



Alpha

0.05

0.05



Lower

0.0259

0.0073



tValue

3.08

4.82

3.93

5.04

–0.39

–1.99

–0.14

–1.80



Probt

0.0086

0.0003

0.0017

0.0002

0.7050

0.0680

0.8889

0.0951



Upper

0.1817

0.0204



about the relationship among the four ration means than is obtained by ignoring the

covariate because it was used as a blocking factor.

Figure 11.1 contains the model specification screen for analyzing the data using

JMP®. ADG was selected as the response variable. The model effects are blk

(specified as being random), ration, wt and wt*ration. Do not use the center model

option from the model specification menu (deactivate it), then click on run model.

Figure 11.2 contains the estimates of the variance components and the test of the

effects in the model. These are identical to those of PROC MIXED in Table 11.16.

The custom test menu can be used to provide least squares means at various values

of wt as was done in Chapter 10, but those results are not included here.



11.9 EXAMPLE: FOUR TREATMENTS IN BIB

The data in Table 11.19 are surface finish measurements (Finish) of rods turned or

cut on a lathe. Sixteen rods were available for the study involving four types of

© 2002 by CRC Press LLC



20



Analysis of Messy Data, Volume III: Analysis of Covariance



TABLE 11.17

Least Squares Means and Comparisons at wt = 0.596, 0.510, and 0.0680

lsmeans ration/diff at means;

lsmeans ration/diff at wt=.510;

lsmeans ration/diff at wt=.680;

Effect

Ration

Ration

Ration

Ration

Ration

Ration

Ration

Ration

Ration

Ration

Ration

Ration



Ration

1

2

3

4

1

2

3

4

1

2

3

4



wt

0.596

0.596

0.596

0.596

0.510

0.510

0.510

0.510

0.680

0.680

0.680

0.680



Estimate

2.0417

2.1475

2.8692

2.4575

2.0838

2.3639

2.8847

2.6533

2.0007

1.9369

2.8541

2.2670



StdErr

0.0742

0.0742

0.0742

0.0742

0.1317

0.1317

0.1317

0.1317

0.1293

0.1293

0.1293

0.1293



df

13.1

13.1

13.1

13.1

13.1

13.1

13.1

13.1

13.1

13.1

13.1

13.1



tValue

27.52

28.95

38.68

33.13

15.82

17.95

21.90

20.15

15.48

14.98

22.08

17.54



Probt

0.0000

0.0000

0.0000

0.0000

0.0000

0.0000

0.0000

0.0000

0.0000

0.0000

0.0000

0.0000



Effect

Ration

Ration

Ration

Ration

Ration

Ration

Ration

Ration

Ration

Ration

Ration

Ration

Ration

Ration

Ration

Ration

Ration

Ration



Ration

1

1

1

2

2

3

1

1

1

2

2

3

1

1

1

2

2

3



_Ration

2

3

4

3

4

4

2

3

4

3

4

4

2

3

4

3

4

4



wt

0.596

0.596

0.596

0.596

0.596

0.596

0.510

0.510

0.510

0.510

0.510

0.510

0.680

0.680

0.680

0.680

0.680

0.680



Estimate

–0.1058

–0.8275

–0.4158

–0.7217

–0.3100

0.4117

–0.2802

–0.8009

–0.5695

–0.5207

–0.2893

0.2314

0.0638

–0.8534

–0.2663

–0.9172

–0.3301

0.5870



StdErr

0.0436

0.0436

0.0436

0.0436

0.0436

0.0436

0.0775

0.0775

0.0775

0.0775

0.0775

0.0775

0.0761

0.0761

0.0761

0.0761

0.0761

0.0761



df

30

30

30

30

30

30

30

30

30

30

30

30

30

30

30

30

30

30



tValue

–2.42

–18.96

–9.53

–16.54

–7.10

9.43

–3.62

–10.34

–7.35

–6.72

–3.73

2.99

0.84

–11.22

–3.50

–12.06

–4.34

7.72



Probt

0.0215

0.0000

0.0000

0.0000

0.0000

0.0000

0.0011

0.0000

0.0000

0.0000

0.0008

0.0056

0.4083

0.0000

0.0015

0.0000

0.0001

0.0000



cutting tools. Three pieces could be turned or cut from each rod. The rods varied in

hardness; thus the rods were considered as blocks and the measure of hardness

(Hard) of a given rod was used as a covariate. Since there were four tool types and

blocks of size three, a balanced incomplete block (BIB) design structure was used

as shown in Table 11.19.

The model using a linear relationship between surface finish and hardness is

Finish ij = α i + βi Hard j + b j + ε ij .

© 2002 by CRC Press LLC



(11.17)



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

8 EXAMPLE: FOUR TREATMENTS IN RCB

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

×