Kevin Crowston
2008-Feb-14 20:05 UTC
[R] Advice on analyzing a mixed effects survival model?
I have an experiment I'm trying to analyze that's turning out to be more complicated than I anticipated, so I was hoping for some suggestions about how to handle it. The lab experiment is a comparison between two search interfaces. After a little training, each subject performs 12 information search tasks, 6 with one interface and 6 with the other, and we measure time to complete and number of clicks. The overall design is a latin square: with 12 subjects, the design has each task done before and after each other one the same number of times, and each is done 6 times with one interface and 6 with the other. Maybe a table will make it clearer what is happening: Run Tasks 1 - 12 8 1 11 7 5 4 6 10 3 9 2 2 - 1 12 7 8 4 11 10 5 9 6 2 3 3 - 9 10 2 4 3 7 6 1 5 12 11 8 4 - 3 2 6 9 5 10 11 4 8 7 12 1 5 - 6 3 5 2 11 9 8 10 12 4 1 7 6 - 5 6 11 3 8 2 12 9 1 10 7 4 7 - 7 1 4 12 10 8 9 11 2 5 3 6 8 - 8 11 12 5 1 6 7 3 4 2 10 9 9 - 10 4 9 7 2 1 3 12 6 8 5 11 10 - 11 5 8 6 12 3 1 2 7 9 4 10 11 - 2 9 3 10 6 4 5 7 11 1 8 12 12 - 4 7 10 1 9 12 2 8 3 11 6 5 Run Interface 1 - 0 0 1 1 1 1 0 0 0 1 1 0 2 - 1 0 1 0 1 0 1 0 1 0 1 0 3 - 0 1 0 1 0 1 0 1 0 1 0 1 4 - 1 0 1 0 1 0 1 0 1 0 1 0 5 - 0 1 0 1 0 1 0 1 0 1 0 1 6 - 1 0 1 0 1 0 1 0 1 0 1 0 7 - 0 1 0 1 0 1 0 1 0 1 0 1 8 - 1 0 1 0 1 0 0 1 1 1 0 0 9 - 1 1 1 0 0 0 1 0 1 0 0 1 10 - 0 0 0 1 0 1 0 1 0 1 1 1 11 - 1 1 0 1 1 0 1 0 1 0 0 0 12 - 0 1 0 0 0 1 1 1 0 0 1 1 The resulting data look something like subject run seq task interface time clicks 1 1 1 12 0 123 18 1 1 2 8 0 197 23 1 1 3 1 1 156 21 .... 2 2 1 1 1 87 10 ..... I was planning originally to analyze the data with ANOVA: time (or probably log(time)) ~ task + subject + interface. Some tasks are harder than others, some subjects slower, but we control for those to see the effect of the interface. I did not plan to include an interaction term: it's not one of our research questions and I don't think I have enough df anyway. At some point, I would like to test if there are learning effects by adding the sequence of the task, but that's for the future. But as I thought about it, things got complicated: first, the design is a repeated measures design for subjects at least; second, both task and subject are best thought of as random factors; and finally, subjects sometimes do not complete a task, so some of the times and clicks are right censored. After some reading of the list and of Pinheiro's Mixed Effects Models, I came up with ways that I think handle these complications one or two at a time, though I am not entirely confident that I have it right: -- one random factor: lm.t<-lme(fixed = log(time) ~ treat + task + found, data = data2, random = ~ 1 | subj) -- lmer can handle two random factors: l.t <-lmer(log(time) ~ treat + (1|subj) + (1|task)) -- coxme from the kinship library can handle the censored data with one random factor: cm.t<-coxme(Surv(log(time),found=="found") ~ treat + task, random= ~ 1| subj) What I haven't found though is a way to analyze the data with censored data and two random factors. I'm also running into additional concepts that I don't fully understand though they seem promising, e.g., frailty models. So, I am hoping someone on the list can suggest an approach to the analysis or suggestions of other readings that might help. Thanks! Kevin Crowston Syracuse University Phone: +1 (315) 443-1676 School of Information Studies Fax: +1 (866) 265-7407 348 Hinds Hall Web: http://crowston.syr.edu/ Syracuse, NY 13244-4100 USA *PS: The attachment named "PGP.sig" of type "application/pgp- signature" is an electronic signature that may be used to verify that this email came from me if you have PGP or GPG. Otherwise, you may safely ignore the attachment. -------------- next part -------------- A non-text attachment was scrubbed... Name: PGP.sig Type: application/pgp-signature Size: 186 bytes Desc: This is a digitally signed message part Url : https://stat.ethz.ch/pipermail/r-help/attachments/20080214/26a20a0e/attachment.bin
Maybe Matching Threads
- Feature request: Sync Mac OS resource forks and metadata on Mac OS X
- lmer for mixed effects modeling of a loglinear model
- lme and mixed effects
- Mixed effects model with a phylogenetic tree/ distance, matrix as a random effect
- General mixed effects Cox models