[R] Contrast matrix with a continuous variable
Carlos Alvarez Roa
carlosalvarezroa at hotmail.com
Sun May 22 13:31:16 CEST 2016
Hello everyone,
I was wondering if could help me designing a
contrast matrix when you have a continuous variable (Days).
My model looks like
this:
model<-lme(Y~A*B*Days,
data=data_over_time)
The factor A hast
two levels (A1 and A2) and factor B has three levels (B1, B2, and B3). I
measured the response variable Y every two or three days over 70 days
(Days).
I need to look at
only a few comparisons over the 70 days such us:
A1 and B1 vs A2 and B1,
A2 and B2 vs
A2 and B1,
A1 and B2 vs
A2 and B2
I could use the
function contrast from the package contrast to design the matrix with the three
comparisons mentioned above for specific days at a time. However, I need to run
the comparison over the 70 days not at individual time points.
I was wondering if
you could help me designing this contrast matrix.
Any help would be
much appreciated.
[[alternative HTML version deleted]]
More information about the R-help
mailing list