Steven,
David Cassell has weighed in with (as always) excellent insight
into the problem. The measurements on either machine are not
independent over time. Nor are the measurments on machine 1
independent from the measurements on machine 2. Effects on day
t that influence machine 1 also operate on machine 2, presumably.
If these two machines are supposed to be measuring the same
response, that should certainly be true.
We can formalize your data model for the value obtained from
machine i on the t-th day as follows:
Y{i_t} = mu + machine{i} + gamma{t} + e{i_t}
gamma{t} ~ N(0, V{day})
[e{i_1}, e(i_2), ..., e(i_30)]' ~ Normal(0, V{resid})
cov(e{1_t}, e{2_t})=0
Here, mu is a grand mean measurement, machine{i} is the (fixed)
effect mean deviation for the i-th machine from the grand mean,
gamma{t} is a random daily effect that influences measurements
on both machines, and e{it} is the residual error with
possibly some serial correlation structure. After accounting
for the random daily effects gamma{t}, the residual terms for
machines 1 and 2 are uncorrelated.
Now, if you take the difference between day t measurements on
machines 1 and 2, then you have
Y{1_t}-Y{2_t} = machine{1} - machine{2} + e{1_t} - e{2_t}
Since the vectors e{1_t} and e{2_t} are both (assumed) normally
distributed, then the difference follows a normal distribution.
In fact, the vector
_ _
| e{1_1} - e{2_1} |
| e{1_2} - e{2_2} | ~ N(0, 2V)
| ... |
| e{1_30} - e{2_30} |
- -
If the residuals for day j are independent from the residuals
for day k, j^=k, then you have the classic paired t-test. If
the residuals are not independent over days, even after allowing
for day effects (due to some serial correlation structure),
then you do not have the classic paired t-test. However, it is
very close to the classic paired t-test.
The MIXED procedure can handle either the classic paired t-test
or the paired t-test subject to serial correlation. For
response which is the difference between machines 1 and 2 on
the t-th day, the classic paired t-test is obtained as
proc mixed data=diffs;
model diff = / s;
run;
The paired t-test subject to serial correlation of type AR(1)
is obtained as
proc mixed data=diffs covtest;
model diff = / s;
repeated day / subject=intercept type=ar(1);
run;
The COVTEST option of this latter invocation of PROC MIXED is
used to obtain a test for the serial correlation parameter.
Note that you can also test the serial correlation parameter
employing a likelihood ratio test where the difference in
-2LL (negative 2 times the log likelihood) between model 1 and
model 2 is distributed chi-square with 1 df.
HTH,
Dale
--- "Hill, Steven" <hi...@SFWMD.GOV> wrote:
> SAS-Ler's:
> Would it be incorrect to use paired t-test to compare independent
> populations? Picture the following: You have a water body from
> which
> you take measurements on 30 consecutive days, with two different
> machines (located next to each other). I know that you can use the
> two
> sample t-test, to statistically compare the data from these machines,
> to
> see if there is a significant difference between the measurements of
> the
> machines. But would it be wrong to use a paired t-test to
> statistically
> compare the measurement between the machines? This would be treating
> the measurement for each day as a pair? Is there anything wrong with
> this? This came up in a meeting and at first thought I didn't see
> this
> as a problem, but the other way around (using two sample t-test on
> truly
> paired (dependent) data) would be inappropriate. Using the paired
> test,
> in the situation I describe above, would yield a more powerful test,
> correct?
> Steven
=====
---------------------------------------
Dale McLerran
Fred Hutchinson Cancer Research Center
mailto: dmclerra@NO_SPAMfhcrc.org
Ph: (206) 667-2926
Fax: (206) 667-5977
---------------------------------------
__________________________________
Do you Yahoo!?
Yahoo! Mail - You care about security. So do we.
http://promotions.yahoo.com/new_mail