[R] lme() direction

Mike Lawrence mike at thatmike.com
Sat Feb 7 15:17:10 CET 2009


Hi guRus,

I'm looking for advice on a good way to approach analysis of some
multi-level data I've obtained. I had humans classify words and
measured response time. Words were 10 positive words ("happy", "joy",
etc) and 10 negative words ("sad","grumpy", etc). Words were also
presented in either white, red or green color. All variables were
manipulated within-Ss and for each word-color combination I collected
10 observations.

So the data would be something like:

set.seed(1)
a=rbind(
	cbind(
		type='positive'
		,expand.grid(
			id=1:10
			,color=c('white','red','green')
			,word=c('happy','joy')
			,repetition = 1:10
		)
	)
	,cbind(
		type='negative'
		,expand.grid(
			id=1:10
			,color=c('white','red','green')
			,word=c('sad','grumpy')
			,repetition = 1:10
		)
	)
)

#add some fake rt data
a$rt=rnorm(length(a[,1]))

#And because people make errors sometimes:
a$error = rbinom(length(a[,1]),1,.1)

#remove error trials because they're not psychologically interesting:
a=a[a$error==0,]


I'm most interested in the interaction between color and type, but I
know that there is likely an effect of word. Yet since word is not
completely crossed with type, simply adding it to an aov() won't work.
A colleague recommended I look into lme() but so far I can't figure
out the proper call.

Another issue is whether to collapse across repetition before running
the stats, particularly since errors will leave unequal numbers of
observations per cell if it's left in.

Any advice anyone can provide would be great!

Mike

-- 
Mike Lawrence
Graduate Student
Department of Psychology
Dalhousie University
www.thatmike.com

Looking to arrange a meeting? Check my public calendar:
http://www.thatmike.com/mikes-public-calendar

~ Certainty is folly... I think. ~




More information about the R-help mailing list