Sunteți pe pagina 1din 12

STA 6167, Section 1648, Fall 2007

Project #3
Due Thursday 2/21/08

RAMI% SHAMSHIRI
UFID#: 9021-3353

Part 1: Repeated Measures A%OVA


A study was conducted to compare relative CO2 exchange for sedum wrightii plants under 2 conditions at 4 time
points, with 3 replicates per treatment. The 2 conditions are Dry (water withheld for several weeks) and Wet.
The response measured was Relative CO2 exchange (Negative=output, Positive=uptake).

Answer:
Here subjects are assigned to treatments and measurements are made repeatedly over some fixed
periods of time. This can be considered as CRD where more than one measurement is being made on
each experimental unit.
Treatments= 2 (The 2 conditions, Treatment1=Dry and Treatment2= Wet) =>a=2
Replicates= 6 (3 replicates per treatment) => b=3
Time point= 4 => r=4
Response: Relative CO2 exchange
1.1- Give the means by treatment and time

Answer:
Treatment- timepoint mean
Treatment 1=Dry

Treatment 2=Wet

Timepoint1

Timepoint2

Timepoint3

Timepoint4

Timepoint1

Timepoint2

Timepoint3

Timepoint4

-1.397
-2.402
-1.358
-1.719

-0.699
-1.201
0.97
-0.31

-0.873
-1.502
-0.194
-0.8563

-0.524
-1.201
0.388
-0.4456

-1.16
-1.47
-1.878
-1.502667

-1.367
-1.617
-2.442
-1.8086

-0.41
-0.735
-0.376
-0.507

0.41
0.735
0.376
0.507

Treatment Mean
No

10

11

12

TRT Mean

TRT 1
TRT2

-1.397
-1.16

-2.402
-1.47

-1.358
-1.878

-0.699
-1.367

-1.201
-1.617

0.97
-2.442

-0.873
-0.41

-1.502
-0.735

-0.194
-0.376

-0.524
0.41

-1.201
0.735

0.388
0.376

-0.832
-0.827

Timepoint Mean
No

Timepoint1

TimePoint 2

TimePoint 3

TimePoint 4

1
2
3
4
5
6
Mean=

-1.397
-2.402
-1.358
-1.16
-1.47
-1.878
-1.6108

-0.699
-1.201
0.97
-1.367
-1.617
-2.442
-1.0593

-0.873
-1.502
-0.194
-0.41
-0.735
-0.376
-0.6816

-0.524
-1.201
0.388
0.41
0.735
0.376
0.0306

From SAS output, we have same results


N
trt
Obs
Variable
Mean

1
12
replic
2.0000000
timepnt
2.5000000
co2
-0.8327500
2
12
replic
5.0000000
timepnt
2.5000000
co2
-0.8278333

N
timepnt
Obs
Variable
Mean

1
6
trt
1.5000000
replic
3.5000000
co2
-1.6108333
2
6
trt
1.5000000
replic
3.5000000
co2
-1.0593333
3
6
trt
1.5000000
replic
3.5000000
co2
-0.6816667
4
6
trt
1.5000000
replic
3.5000000
co2
0.0306667

N
trt
timepnt
Obs
Variable
Mean

1
1
3
replic
2.0000000
co2
-1.7190000
2
3
replic
2.0000000
co2
-0.3100000
3
3
replic
2.0000000
co2
-0.8563333
4
3
replic
2.0000000
co2
-0.4456667
2
1
3
replic
5.0000000
co2
-1.5026667
2
3
replic
5.0000000
co2
-1.8086667
3
3
replic
5.0000000
co2
-0.5070000
4
3
replic
5.0000000
co2
0.5070000

1.2- Give the treatment mean differences (Wet-Dry) for each time point

Answer:
Time Point
1
2
3
4

Wet Mean

Dry Mean
-1.7190000
-0.3100000
-0.8563333
-0.4456667

-1.502667
-1.8086667
-0.5070000
0.5070000

Wet-Dry Mean

0.216333
-1.4986667
0.3493333
0.9526667

1.3- Give the Analysis of Variance Table

Answer:
Source
Treatments
Subjects(trts)
Time
Trt*Time
Error
Total

SS
SSA
SSB(A)
SSTime
SSAti
SSE

df
a-1
a(b-1)
r-1
(a-1)(r-1)
a(b-1)(r-1)
abr-1

MS
MSA
MSB(A)
MSTime
MSATi
MSE

Source
Treatments
Subjects(trts)
Time
Trt*Time
Error
Total

SS
0.0001450
5.10013767
8.55026412
4.9834691
1.36

df
2-1=1
2(3-1)=4
4-1=3
(2-1)(4-1)=3
2(3-1)(4-1)=12
2*3*4-1=23

MS
0.0001450
1.275
2.85008804
1.66115637
0.1134049

F
MSA/MSB(A)
MSTime/MSE
MSATi/MSE

F
1.13 e-4~=0
25.13
14.65

1.4- Test for a Treatment by Time interaction (


=0.05)

Answer:
According to the model:

      
   
   

  :Interaction of the ith treatment and the k time point


th

So, testing for a treatment by time interaction involves the below hypothesis:
H0:
  =
  =. . .=0 (No Treatment by time interaction)
HA: Not all
   0 (Treatment by time interaction effect exist)
Fobs= MSATi/MSE = 1.66115637/0.1134049=14.65

F0.05, (a-1)(r-1), a(b-1)(r-1)=F0.05,3,12= 3.49

(From F-Table)

Conclusion:
The Fobs value is greater than the critical F, thus producing P-value less than the significant level (
=0.05).
So we conclude to reject the null hypothesis. In the other words, interaction effects exist between
treatment and time.

1.5- Test for Time and Treatment main effects (each at =0.05)
Answer:
Test for Treatment effect:
H0:  =. . . =  = (No Treatment effect)
HA: Not all   0 (Treatment effects exist)
Fobs= MSA/MSB(A) = 0.0001450/1.275=0.000011

F0.05, (a-1), a(b-1)=F0.05,1,4= 7.7 (From F-Table)


Conclusion:
The Fobs value is less than the critical F (7.7), thus producing P-value greater than the significant level
(
=0.05). So we conclude NOT to reject the null hypothesis. In the other words, No treatment effect
exists.
Test for Time effect:
H0:  =. . . =  = (No Time effect)
HA: Not all   0 (Time effects exist)
Fobs= MSTime/MSE = 2.85/0.113=25.22

F0.05, (r-1), a(b-1)(r-1)=F0.05,3,12= 3.49

(From F-Table)

Conclusion:
The Fobs value is greater than the critical F (3.49), thus producing P-value smaller than the significant
level (
=0.05). So we conclude TO REJECT the null hypothesis. In the other words, Time effects exixst.
1.6- If there is a Treatment by Time interaction, test for treatment effects at each time point.

Answer:
H0: Trt in Time 1 effect exist
H0: Trt in Time 2 effect exist
H0: Trt in Time 3 effect exist
Contrast
Trt in Time 1
Trt in Time 2
Trt in Time 3

DF

Contrast SS

Mean Square

1
1
1

0.07020017
3.36900267
0.18305067

0.07020017
3.36900267
0.18305067

F Value

Pr > F

0.06
2.64
0.14

0.8260
0.1794
0.7240

Conclusion:
All the three P-values are greater than the significant level (=0.05) which leads to NOT Rejecting our
Null hypothesis. In the other words, treatment effects at each of the above three time points exist.

Part 2: Split-Plot Experiment


A split-plot experiment was conducted to measure the effects of 4 rates of seeding of the perennial Harding
grass (whole plots, with levels of 1,2,3,4 pounds per acre), and 6 rates of seeding of ryegrass (subplots with
levels of 0,3,6,9,12,15 pounds per acre). The experiment was conducted in 3 blocks (replicates). The response
measured was the density of Harding grass. Complete the following ANOVA table, and give the tests for all
relevant effects. Note: F (0.05, 15, 40) =1.924
Answer:
Here we have a larger experimental units (Whole plots) which are made up smaller subunits (Subplots). The model
is as below:
       
    
   

 : Effect of the i level (Whole plot) of factor A


th
 : Effect of the j block

  : Interaction between the ith level of factor A and Block j


th
 : Effect of the k level (sub-plot) of factor C
th

  : Interaction between the ith level of factor A and the k level of factor C
th

A= Whole plots=Rate of Hardinggrass (HG) = 1,2,3,4 pounds per acre => a=4
C= Subplots= Rate of ryegrass = 6 rates of seeding of ryegrass => c=6
B= Blocks=3 =>b=3
2.1- ANOVA table
Here both factors A and C (Blocks and rate of ryegrass) are fixed.
Source
SS
df
MS

F Critical Value

MSA/MSAB

F,(a-1),(a-1)(b-1)

Factor A

SSA

a-1

MSA

Factor B
A*B

SSB
SSAB

b-1
(a-1)(b-1)

MSB
MSAB

Factor C

SSC

c-1

MSC

MSC/MSE

F,(c-1), a(b-1)(c-1)

A*C

SSAC

(a-1)(c-1)

MSAC

MSAC/MSE

F,(a-1)(c-1),a(b-1)(c-1)

Error
Total

SSE

a(b-1)(c-1)
abc-1

MSE

Source
Whole Plots=Rate of
Hardinggrass (HG)
Block (B)

df

SS

MS

Critical Value

a-1 =3

4686

1562

1562/ 283=5.519

F0.05,3,6 =4.75

b-1 =2

500

250

(a-1)(b-1)=6

1698

283

F0.05,5, 40 =2.44
F0.05,15,40 =1.924

B* (HG)
Subplot Rate of
ryegrass(RG)
(RG*HG)

c-1=5

28435

5687

5687/387=14.69

(a-1)(c-1)=15

9600

640

640/387=1.65

Error2

a(b-1)(c-1)=40

15480

387

Total

abc-1=71

Test for interactions and for effects of factors A,C and their interaction involve the three F-stat.
Test for interaction between the whole plot factors (A) and sub-plots factors C:
H0:
  . . 
   0 (No factor AC interaction)
HA:
   0 (AC interaction exists)
Fobs= MSAC/MSE=640/387=1.65

Fcritical= F,(a-1)(c-1),a(b-1)(c-1) = F0.05,15,40 =1.924


Decision: Fail to Reject the Null hypothesis. No HG*RG interaction effect exists.

Assuming no interaction exists, test for difference among the effects of the levels of factor A:
H0:  . .    0 (No factor A effect)
HA: Not all  =0 (Factor A effect exist)
Fobs= MSA/MSAB =1562/ 283=5.519
Fcritical= F,(a-1),(a-1)(b-1)= F0.05,3,6 =4.75
Decision: Reject the Null hypothesis. Factor A (HG) effect exists.

Assuming no interaction exists, test for difference among the effects of the levels of factor C:
H0:  . .    0 (No factor C effect)
HA: Not all  =0 (Factor C effect exist)
Fobs= MSAC/MSE= 5687/387=14.69
Fcritical= F,(c-1), a(b-1)(c-1)= F0.05,5, 40 =2.44
Decision: Reject the Null hypothesis. Factor C (RG) effect exists.

2.2- Based on Bonferronis method with an experiment-wise error rate of E = 0.05, pairs of rate of hardinggrass
need to differ by how much to conclude that their means are significantly different?
Answer:
According to the below calculations, they should differ by 25.154 to conclude that their means are significantly
difference.

..  ..  /

,
"
#" $%&'(

C*=a(a-1)/2=6

=> / ,
"
#" ,%&'(

#

2

*+

 -.-./,/ ,283
2  25.154

2.3- Based on Bonferronis method with an experiment-wise error rate of E = 0.05, pairs of rate of ryegrass
means need to differ by how much to conclude that their means are significantly different? The appropriate
t-value is t(.05/(2(15)),40)=3.372.
Answer:
According to the below calculations, they should differ by 27.07 to conclude that their means are significantly
difference.

..  ..6  /


C*=c(c-1)/2=15

,
#"
" $%&7

=> / ,
#"
" ,%&7

#

2

8*

 -.-./9-,:- ,387
  27.07


Part 3: Analysis of Covariance:


An experiment was conducted to compare 6 treatments of wool fibers. The response of interest is the square
root of the Hookean slope when wet (Y), and the covariate is the square root of the Hookean slope at 65%
relative humidity (X). We would like to test for differences among the 6 treatments, after controlling for the
covariate. First, we will test whether there is an interaction between treatment and covariate, then if not, we
will test for treatment effects, controlling for the covariate. The treatments are:








Untreated (Baseline Group)


Ether-extracted (Z1=1)
Ether/Alcohol-extracted (Z2=1)
Alcohol Potash for15 seconds (Z3=1)
Alcohol Potash for 4 minutes (Z4=1)
Alcohol Potash for15 minutes (Z5=1)

The models are:

Model 1 :
E (Y ) = + X + 1 Z 1 + 2 Z 2 + 3 Z 3 + 4 Z 4 + 5 Z 5 + 1 XZ 1 + 2 XZ 2 + 3 XZ 3 + 4 XZ 4 + 5 XZ 5

Model 2 : E (Y ) = + X + 1 Z 1 + 2 Z 2 + 3 Z 3 + 4 Z 4 + 5 Z 5
Model 3 : E (Y ) = + X

3.1- Test whether the covariate effect (slope) is common to all treatments (H0: 1=2=3=4=5=0)
Answer:
Complete model:

E (Y ) = + X + 1Z1 + 2 Z 2 + 3 Z 3 + 4 Z 4 + 5 Z 5 + 1 XZ1 + 2 XZ 2 + 3 XZ 3 + 4 XZ 4 + 5 XZ 5

Reduced Model:

E (Y ) = + X + 1Z1 + 2 Z 2 + 3 Z 3 + 4 Z 4 + 5 Z 5

Construct 3 sets of independent variables as {X} , {Z1,Z2,...,Z5}, {XZ1,...,XZ5}


Fit complete model, containing all 3 sets. Obtain SSEC (or, equivalently RC2) and dfC
Fit Reduced, model containing {X} , {Z1,Z2,...,Z5}. Obtain SSER (or, equivalently RR2) and dfR
H0: 1=...=5=0 (No interaction).
Test Statistic:

Fobs

SSE R SSE C

df R df C
=
=
SSE C

df C

RC2 R R2 6.254 5.678


0.9092 0.9

df

df
0
.
1152
C
R
53 48
=
=
= 0.9731 = 53 48 = 0.9731
2
5
.
678
1 0.9092
11.829
1 RC

48
48
df C

From SAS output we have:


SSE(C)=5.678
df (C)=48
SSE(R)= 6.254
df (R)=53
8

F-critical= F0.05, (df(R)-df(C)),( df(C)),=F0.05,5,48=2.408


Decision:
The F statistic is 0.9731 which is less than the critical value of F (2.408). It means that the p-value of our
F statistic will be greater than the significant level (=0.05), thus we Fail to reject the null hypothesis; in
the other word, we conclude that interaction effects exist.

SAS output for the complete model


Source
Model
Error
Corrected Total
R-Square
0.909296

DF
11
48
59

Sum of
Squares
56.92739597
5.67860403
62.60600000

Coeff Var
4.797125

Mean Square
5.17521782
0.11830425

Root MSE
0.343954

F Value Pr > F
43.74 <.0001

sqhwet Mean
7.170000

SAS output for the reduced model:


Dependent Variable: sqhwet
Source
Model
Error
Corrected Total
R-Square
0.900101

DF
6
53
59

Sum of
Squares
56.35174976
6.25425024
62.60600000

Coeff Var
4.791048

Mean Square
9.39195829
0.11800472

Root MSE
0.343518

F Value Pr > F
79.59 <.0001

sqhwet Mean
7.170000

3.2- Assuming you fail to reject the previous hypothesis, test whether there are treatment differences,
after controlling for the covariate: (H0: 1=2=3=4=5=0)
Answer:
Fit Complete, model containing {X} , {Z1,Z2,...,Zg-1}, Obtain SSEC (or, equivalently RC2) and dfC
Fit Reduced, model containing {X}, Obtain SSER (or, equivalently RR2) and dfR
H0: 1=...=5=0 (No group differences) Test Statistic:

Fobs

SSE R SSEC RC2 RR2


df df df df
R
C
C
= R
=
2
SSEC
1 RC
df
df
C
C

From SAS output we have:


SSE(C)=6.2542
df (C)=53
SSE(R)= 6.808
df (R)=58

Fobs

SSE R SSE C

df R df C
=
=
SSE C

df C

RC2 R R2 6.808 6.2542


0.9 0.891255

df

df
0.11076
C
R
58 53
58 53
=
=
= 0.9386 =
= 0.9386
2
6
.
2542
1 0.9
0.118
1 RC

53
53
df C

F-critical= F0.05, (df(R)-df(C)),( df(C)),=F0.05,5,53=2.3894

Decision:
The F statistic is 0.9386 which is less than the critical value of F (2.3894). It means that the p-value of our
F statistic will be greater than the significant level (=0.05), thus we Fail to reject the null hypothesis; in
the other word, we conclude that group difference exist.

SAS output for the complete Model


Source
Model
Error
Corrected Total
R-Square
0.900101

DF
6
53
59

Sum of
Squares
56.35174976
6.25425024
62.60600000

Coeff Var
4.791048

Mean Square
9.39195829
0.11800472

Root MSE
0.343518

F Value
79.59

Pr > F
<.0001

sqhwet Mean
7.170000

SAS output for the Reduced Model:


Source
Model
Error
Corrected Total

R-Square
0.891255

DF
1
58
59

Sum of
Squares
55.79794006
6.80805994
62.60600000

Coeff Var
4.778356

Mean Square
55.79794006
0.11738034

Root MSE
0.342608

10

F Value
475.36

sqhwet Mean
7.170000

Pr > F
<.0001

3.3- Obtain the Unadjusted Mean response for each treatment


Answer:
For Y values:
No
1
2
3
4
5
6
7
8
9
10
Mean

Treatment
1

Treatment
2

Treatment
3

Treatment
4

Treatment
5

Treatment
6

7.3
7.7
7.3
7.5
7.9
7.5
6
7.9
6.9
6.5
7.25

6.4
6.3
7.5
7.5
7.7
6.2
7.9
7.9
7.3
8
7.27

6
6.9
7
6.4
9.3
6.3
7.6
7
6.2
7.3
7

9.4
5.6
4.9
5.7
7.7
6.7
6.9
8.9
5.7
6.2
6.77

8.2
7.9
5.8
6.6
9.2
7.2
7.9
8.3
8.4
8.6
7.81

7.1
6.5
7.1
6.2
6.9
8.1
5.6
7.1
5.5
9.1
6.92

For X values:
No

Treatment
1

Treatment
2

Treatment
3

Treatment
4

Treatment
5

Treatment
6

1
2
3
4
5
6
7
8
9
10
Mean=

10.5
11.8
11.1
11.2
12
11.3
9.2
11.7
10.6
9.9
10.93

9.7
9.6
11.2
11
11.3
10.3
12.4
11.7
11
12.2
11.04

8.6
10
10.3
10.1
13.6
8.9
11.6
10.4
9.2
10.6
10.33

11.9
8.4
8
9.4
12.4
10.4
10.1
13.3
9.5
9.3
10.27

11.9
12
8.8
10.1
13.9
10.8
12
12.2
12.1
12.5
11.63

10.3
10.2
10.4
9.2
10.7
13.7
8.4
10.8
9.2
13.6
10.65

11

3.4- Obtain the adjusted mean response for each treatment (replace X in model 2 with the overall
mean of X).
Answer:
Overall mean of X= 10.80833
The 2nd Model: E (Y ) = + X + 1Z1 + 2 Z 2 + 3 Z 3 + 4 Z 4 + 5 Z 5
From SAS output for the second model, we have

=
2 =

-0.1909
0.1584

=
3 =

0.6807
-0.03068

1 =
4 =

-0.0548
0.0834

5 =

-0.1393

Adjusted mean response in Treatment No1: (Z1=Z2= Z3=Z4= Z5= 0)

E (Y ) = 0.1909 + 0.6807(10.80833) + (0.0548)(1) = 7.111

Adjusted mean response in Treatment No2:

(Z1=1

and

Z2= Z3=Z4= Z5= 0)

Adjusted mean response in Treatment No3:

(Z2=1

and

Z1= Z3=Z4= Z5= 0)

Adjusted mean response in Treatment No4:

(Z3=1

and

Z1= Z2=Z4= Z5= 0)

Adjusted mean response in Treatment No5:

(Z4=1

and

Z1= Z2=Z3= Z5= Z6= 0)

E (Y ) = 0.1909 + 0.6807(10.80833) + (0.1584)(1) = 7.3247

E (Y ) = 0.1909 + 0.6807(10.80833) + (0.03068)(1) = 7.1356


E (Y ) = 0.1909 + 0.6807(10.80833) + (0.0834)(1) = 7.2497
E (Y ) = 0.1909 + 0.6807(10.80833) + (0.1393)(1) = 7.027

SAS output:
Parameter

Estimate

Standard
Error

t Value

Pr > |t|

Intercept
sqhair
eth
ethalc
ap15s
ap4m
ap15m

-.1909173343
0.6807792621
-.0548857188
0.1584675572
-.0306856870
0.0834545166
-.1393818066

0.37892656
0.03321334
0.15366942
0.15491310
0.15518204
0.15537528
0.15390721

-0.50
20.50
-0.36
1.02
-0.20
0.54
-0.91

0.6165
<.0001
0.7224
0.3110
0.8440
0.5934
0.3692

12

S-ar putea să vă placă și