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

Ryan Hope rmh3093 at gmail.com
Wed Apr 1 17:54:21 CEST 2009


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




More information about the R-help mailing list