[R] Help with mixed-effects model with temporal pseudoreplication!

Dieter Menne dieter.menne at menne-biomed.de
Wed Apr 1 18:43:18 CEST 2009




Bugzilla from rmh3093 at gmail.com wrote:
> 
> Responses:
> CompletionTIme
> VisitedTargets
> 
> Fixed-factors:
> Targets (4-levels): 4, 9, 14, 19
> Entropy (3-levels): Low, Medium, High
> 
> Random-factors:
> Participants: 31 total participants
> Replicates: 5 (this could also be viewed as a time factor I think)
> BlockOrder: 1 though 60 (the order of the trials was random for each
> participant, but I am not so concerned about this right now)
> 
> The fixed part of the model seems pretty intuitive:
> fixed=log(CompletionTime)~(Targets*Entropy)
> 
> The random part of the model is where I get stuck on, I've tried many
> combinations and all give me the wrong degrees of freedom. I really
> don't know what to use.  Any help would be greatly appreciated!!!!
> 
> Here is the code I am using in R:
> 
> library(nlme)
> datafile="http://people.rit.edu/rmh3093/mot.csv"
> master1 = read.table(datafile,header=T)
> Block=factor(master1$Block)
> BlockOrder=factor(master1$Block_Order)
> Replicate=factor(master1$Replicate)
> Participant=factor(master1$Participant_ID)
> Targets=factor(master1$Targets)
> Entropy=factor(master1$Entropy)
> CompletionTime=master1$Completion_Time
> summary(lme(log(CompletionTime)~(Entropy*Targets),random=~1|Participant,method="ML"))
> 

Looks perfectly fine to me. To paraphrase Kubrick: Stop worrying about
degrees of freedoms, and love your results. You might find a few flames and
insights when searching the list for "degrees freedom bates lme lmer".

Using log(CompletionTime) is fine if that's what is usually done in your
field, but think of using the weights argument in lme to get results
directly in linear units. Most readers prefer time to log(time) in the final
result.

Dieter





-- 
View this message in context: http://www.nabble.com/Help-with-mixed-effects-model-with-temporal-pseudoreplication%21-tp22829729p22830759.html
Sent from the R help mailing list archive at Nabble.com.




More information about the R-help mailing list