Which mgcv version are you using, and which package (and version number) are
you using for the `contrast' function? (I assume you mean `gamm' below,
btw)
On Thursday 22 July 2010 20:13, Xia Li wrote:> Dear All,
> I met problems when doing contrast and now really need some help in the
> model below:
>
> Fit=gam(y~treat+SEQUENCE+PERIOD+SEX+s(x),data=dat,
> random=list(SUBJID=~1),correlation=corAR1(form=~1|SUBJID))
>
> And error message keeps coming out when I want to compare the differences
> between treatments:
>
> Diff=contrast(Fit,
> list(treat=treatment[-placebo.pos]),list(treat="Placebo"),
> conf.int=0.9)-- (here
> placebo.pos=position of "Placebo" in treatment vector)
>
> I wonder if the function contrast could be used here? If not, what other
> options I might have?
>
> I hope it's not a stupid question?
>
> Thanks a lot!
>
> Xia Li
>
> [[alternative HTML version deleted]]
-- > Simon Wood, Mathematical Sciences, University of Bath, Bath, BA2 7AY UK
> +44 1225 386603 www.maths.bath.ac.uk/~sw283