[R-sig-ME] unreplicated repeated measures

Jinsong Zhao jszhao at yeah.net
Wed Nov 23 16:33:32 CET 2011


It's a old post found by searching.

On 2009-6-24 1:29, Christine Griffiths wrote:
> Dear R users,
>
> Sorry if this question is not applicable to this site. I am having problems
> analysing unreplicated repeated measures. I calculated food web properties
> for three treatments over time (10 months). It is unreplicated in that I
> only have one observation per month per treatment. My problem is that I am
> interested in how a food web property varies between Treatments and over
> time.
>

I have a similar data set, and hope to do similar statistical analysis.

> Originally I had tried using lmer:
> m4<-lmer(lncon~Treatment*month+(1|month),data=dataset)
> but this provides the following error for which I have not found an
> explanation to on the R site.
> Error in mer_finalize(ans) : Calculated PWRSS for a LMM is negative

gls() in nlme package was recommended to deal with my situation. 
However, I don't know how to describe the fixed effects:

gls(lncon~Treatment*month, data = dataset)

or

gls(lncon~Treatment+month, data = dataset)

It seems that the above two formula can run correctly, however, I don't 
know which one should be preferred, and whether the variable month 
should be treated as a factor or a continuous variable. I have read the 
book of Pinheiro & Bates, and found the time variable in dataset, e.g., 
Orthodont, is a numeric vector. What's the difference?

Is it possible to intercept the data by lme() or lmer(), for there is no 
group variable?

<snip>

Any suggestions or comments will be really appreciated. Thanks in advance.

Regards,
Jinsong




More information about the R-sig-mixed-models mailing list