Ryan Hope
2009-Apr-01 15:54 UTC
[R] Help with mixed-effects model with temporal pseudoreplication!
Sorry if this is the wrong ml for this question, I am new to R. I am trying to use R to analyze the data from my thesis experiment and I am having troubles accounting for the pseudoreplication properly from having each participant repeat each treatment combination (combination of fixed factors) 5 times. The design of the experiment is as follows... 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")) Thanks in advance! -Ryan
Dieter Menne
2009-Apr-01 16:43 UTC
[R] Help with mixed-effects model with temporal pseudoreplication!
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.
Apparently Analagous Threads
- creating variable that codes for the match/mismatch between two other variables
- replication + attachment sis + zlib bug ? (HEAD version from xi.rename-it.nl)
- Geo-replication status is getting Faulty after few seconds
- Geo-replication status is getting Faulty after few seconds
- Geo-replication status is getting Faulty after few seconds