yij = observation j in group i (treatment i)
0 = the intercept
1 = the regression coefficient
xij = a continuous independent variable with mean x (covariate)
i = the fixed effect of group or treatment i
ij = random error
The overall mean is: = 0 + 1x
The
It is assumed that covariances between measures on different subjects
are zero.
An equivalent model with a variance-covariance structure between
subjects included the
error term (ijk) can be expressed as:
yijk = + i + tk + (*t)ik + ijk i = 1,.,a; j = 1,.,
The critical value for the model is F0.05,3,10 = 3.71. The null hypotheses if
particular
parameters are equal to zero can be tested using t tests. The parameter
estimates with their
corresponding standard errors and t tests are shown in the following
tabl
UN(1,1) = 0.01673 denotes the variance of measurements taken in
period 1, and
UN(3,1) = 0.01226 denotes the covariance between measures within
animals taken in
periods 1 and 3. The variance-covariance estimates in matrix form are:
0.00792 0.02325 0.03167
B behind the estimates denotes that the corresponding solution is not
unique. Only the
slope (initial) has a unique solution (0.6043956). Under the title Least
Squares Means the
means adjusted for differences in initial weight (LSMEAN) with their
Standard
340 970 390 980 420 1000
To show the efficiency of including the effect of initial weight in the
model, the model for
the completely randomized design without a covariate is first fitted. The
ANOVA table is:
Source SS df MS F
Treatment 173.333 2 86.667 0.
that can be tested against zero, that is, if the slope for that group is
different than the average
slope of all groups. This multiple regression model is equivalent to the
model with the
group effect as a categorical variable, a covariate and their inter
M+F
c)
F
M
y
x
b)
F
M
Figure 19.1 Regression models with sex as a categorical independent variable: a) no
difference between males (M) and females (F); b) a difference exists but the slopes are
equal; c) a difference exists and slopes are different
There
of variation are Model, residual (Error) and
Corrected Total. In the table are listed
degrees
of freedom (DF), Sum of Squares, Mean
Square, calculated F (F value) and P value
(Pr>F). In the next table F tests for initial,
treatment and initial * treatment
Cov Parm Subject Estimate
CS kid(treatment) 0.02085
Residual 0.01106
Fit Statistics
-2 Res Log Likelihood -59.9
AIC (smaller is better) -55.9
AICC (smaller is better) -55.7
BIC (smaller is better) -54.3
Null Model Likelihood Ratio Test
DF Chi-Square Pr >
indicating interaction between x1i and x2i. The expectation of the
dependent variable is:
E(yi) = 0 + 1x1i + 2x2i+ 3x1ix2i
Chapter 19 Analysis of Covariance 361
For males (M) the model is:
E(yi) = (0 + 2) + (1 + 3)x1i
For females (F) the model is:
E(yi) =
A 400 1000 B 340 950 C 320 940
A 360 980 B 410 980 C 330 930
A 350 980 B 430 990 C 390 1000
A 340 970 B 390 980 C 420 1000
;
PROC GLM;
CLASS treatment;
MODEL gain = initial treatment / SOLUTION SS1;
LSMEANS treatment / STDERR PDIFF TDIFF ADJUST=TUKEY;
RUN
(*x)ij = interaction of group x covariate
ij = random error
The overall mean is: = 0 + 1x
The mean of group i is: i = 0 + i + 1x + 2ix
The intercept for group i is: 0 + i
The regression coefficient for group i is: 1 + 2i
The hypotheses are the following:
+ ij + tk +(*t)ik + ijk i = 1,.,a; j = 1,.,b; k = 1,.,n
where:
yijk = observation ijk
i
366 Biostatistics for Animal Science
= the overall mean
i
= the effect of treatment i
tk = the effect of period k
(*t)ik = the effect of interaction between treatment
0.00015 0.01127 0.02062 0.02849
0.01127 0.02062 0.02849 0.02062
0.02062 0.02849 0.02062 0.01127
0.02849 0.02062 0.01127 0.00015
SAS gives several criteria for evaluating model fit including Akaike
information criteria
(AIC) and Swarz Bayesian information
subjects is equal to zero.
More complex models can include different variances and covariances
for each
treatment group for both the between and within subjects. These will be
shown using SAS
examples.
20.3.1 SAS Examples for Random Coefficient Regression
2
31
23
2
21
12
2
1
32 3
24
2
13 14
where:
i
= variance of measures in period i
ij = covariance within subjects between measures in periods i and j
Another model is called an autoregressive model. It assumes that with
greater distance
between periods, cor
independent. It may be necessary to define an appropriate covariance
structure for such
measurements. Since the experimental unit is an animal and not a single
measurement on
the animal, it is consequently necessary to define the appropriate
experimental
;
PROC GLM;
CLASS treatment;
MODEL gain = initial treatment treatment*initial / SOLUTION SS1;
RUN;
PROC GLM;
CLASS treatment;
MODEL gain = treatment treatment*initial / NOINT SOLUTION SS1;
RUN;
The GLM procedure is used. The CLASS statement defines
treatm
The continuous variable in the model is called a covariate. Common
application of analysis
of covariance is to adjust treatment means for a known source of
variability that can be
explained by a continuous variable. For example, in an experiment
designed
TREATMENT A -469.3384880 B -3.15 0.0104
149.0496788
B 0.0000000 B . . .
INITIAL*TREAT A 1.4239977 B 3.54 0.0053
0.4018065
B 0.0000000 B . . .
NOTE: The X'X matrix has been found to be
singular and a generalized
inverse was used to solve the normal
equatio
effect, plots within pasture treatments (plot(pasture), which will thus be
defined as the
experimental error for testing pasture. The LSMEANS statement
calculates effect means.
The options after the slash specify calculation of standard errors and
tests o
Error are presented. In the Differences of Least Squares Means table the
differences among
means are shown (Estimate). The differences are tested using the TukeyKramer procedure,
which adjusts for multiple comparison and unequal subgroup size. The
correct
Standard
Parameter Estimate Error t Value Pr > |t|
Intercept 747.1648352 B 30.30956710 24.65 <.0001
initial 0.6043956 0.08063337 7.50 <.0001
treatment A 15.2527473 B 6.22915600 2.45 0.0323
treatment B -6.0879121 B 6.36135441 -0.96 0.3591
treatment C 0.000
Example: A table with sources of variability,
degrees of freedom, and appropriate error
terms for the example with three treatments,
four animals per treatment, and six weekly
measurements per animal is:
368 Biostatistics for Animal Science
Source Degrees
bbb
ij = random error
Alternatively, the random coefficient regression model can be expressed
as:
yij = 0 + 1tij + b0i + b1itij + ij
0 + 1tij representing the fixed component and b0i + b1itij + ij representing
the random
component. The means of b0i and b1
Source Degrees of freedom
Treatment (a 1) = 2
Error for treatments
(Cow within treatment) a(b 1) = 9
Weeks (n 1) = 5
Treatment x weeks (a 1)(n 1) = 10
Error a(b 1)(n 1) = 45
Total (abn 1) = 71
The experimental error for testing the effect
of treatment is
20.3 Random Coefficient Regression
Another approach for analyzing repeated measures when there may be
heterogeneous
variance and covariance is random coefficient regression. The
assumption is that each
subject has its own regression defined over time, thu