+ Reply to Thread
Results 1 to 3 of 3

Thread: Advice on linear mixed model on longitudinal data

  1. #1
    Points: 16, Level: 1
    Level completed: 31%, Points required for next Level: 34

    Posts
    2
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Advice on linear mixed model on longitudinal data




    Hello,

    I have a longitudinal dataset of cumulative biomass from an experiment. The subjects have been exposed of 3 different treatments (LOW, MED, HI) during 194 days, and measured repeatedly at 40 occasions. According to my plot, it looks like one of the HI treatment is starting to differ from the other two after ~100 days. Therefore I am interested to see if the responses of the groups is dependent on the exposure time (i.e. the interaction of treatment and time). To do this, I want to construct a linear mixed model in R, with lme (from nlme package), with a random intercept and slope. This is what I got so far:

    Biomass.lme<-lme(Biomass~Treatment*Day,random=~Day|Subject,data=longterm, na.action=na.exclude)

    My stats/R coding is a bit rusty and I have a few questions. I have tried to find examples with similar datasets and followed a few tutorials. So I hope you do not find my questions too basic.

    1. Do you think that this model is valid in terms of my research question? I would prefer a linear mixed model over a RM ANOVA since I have a few missing data points.

    2. Since this is a time series dataset, one would expect that there is a strong correlation in time and that a autocorrelation structure would be appropriate. However, I tried to add this (corr=corAR1(form=~Day|Flask)) to the model, but it did not improve the fit. I was a bit surprised - did I type it in correctly?

    3. I have treated Day as a continuous variable. Do you think this is appropriate for my question? I am not complete sure how the interpretation of the output would differ if i treat Day as a factor.


    I hope I have provided enough information to answer my questions, otherwise I will add it.

  2. #2
    Human
    Points: 12,686, Level: 73
    Level completed: 59%, Points required for next Level: 164
    Awards:
    Master Tagger
    GretaGarbo's Avatar
    Posts
    1,363
    Thanks
    455
    Thanked 462 Times in 402 Posts

    Re: Advice on linear mixed model on longitudinal data

    A reproducible example would help.

    If you can not, or are forbidden to, to show your real data, then maybe you can make up some data, that essentially contains the characteristics of the real data.

  3. The Following User Says Thank You to GretaGarbo For This Useful Post:

    and0s (07-28-2013)

  4. #3
    Points: 16, Level: 1
    Level completed: 31%, Points required for next Level: 34

    Posts
    2
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Re: Advice on linear mixed model on longitudinal data


    Okey, here are some example data, with the code:

    Biomass<-subset(read.table("Biomass.txt",h=T),Blank=="Sample")

    Biomass.lme<-lme(Biomass~Treatment*Day,random=~Day|Subject,data=Biomass, na.action=na.exclude)
    Attached Files

+ Reply to Thread

           




Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts






Advertise on Talk Stats