Hi folks, I have a dataset from a trial measuring the subjects' pupils. There are many measurements, all of which must be analysed in a similar fashion; so if I get the analysis right for one of them, I've got them all. For simplicity, let us call any measurement we may be interested as "response". The study design is an unbalanced latin square, with 5 periods, 5 treatments and 6 subjects. Each subject has two measurements: left and right eyes. The model is as follows, with ":" denoting interaction... Fixed Effects = (Subject + Period + Dose):Eye Random Effects = Subject:Period + Subject:Period:Eye My main question is how to make this happen in R. I know that "aov" is not suitable. If you need any more information, I will do my best to provide it to the best of my knowledge. I'm sort of a new user to statistical software - I've only used R for 3 months so far. So any additional tips would be greatly appreciated. Thanks. :) -- View this message in context: http://r.789695.n4.nabble.com/Unbalanced-Mixed-Linear-Models-With-Nested-Stratum-tp3263969p3263969.html Sent from the R help mailing list archive at Nabble.com.
JaFF <el.romaro <at> gmail.com> writes:> > > Hi folks, > > I have a dataset from a trial measuring the subjects' pupils. There are many > measurements, all of which must be analysed in a similar fashion; so if I > get the analysis right for one of them, I've got them all. For simplicity, > let us call any measurement we may be interested as "response". The study > design is an unbalanced latin square, with 5 periods, 5 treatments and 6 > subjects. Each subject has two measurements: left and right eyes. The model > is as follows, with ":" denoting interaction... > > Fixed Effects = (Subject + Period + Dose):Eye > Random Effects = Subject:Period + Subject:Period:Eye >> My main question is how to make this happen in R. I know that "aov" is not > suitable. If you need any more information, I will do my best to provide it > to the best of my knowledge.Doesn't "treatment" appear in fixed effects somewhere? Perhaps you mean (Treatment+Period+Dose):Eye? Translating your specification directly (substituting 'treatment' for 'subject' in the fixed effects) I would say lmer(response~(Treatment+Period+Dose):Eye + (Eye|Subject:Period), data=...) should be OK. Do you really want interactions only (:) rather than crossing (*) for the fixed effects? You will get a model with the same number of parameters either way, but parcelled out among effects differently.
Hi, I have found Pinheiro and Bates an absolute godsend for mixed modelling, http://www.amazon.com/Mixed-Effects-Models-S-S-Plus/dp/0387989579 alternatively, there is a REALLY good chapter in the 3rd edition of DAAG: http://www.amazon.com/Data-Analysis-Graphics-Using-Example-Based/dp/0521762936/ref=sr_1_1?ie=UTF8&s=books&qid=1297195439&sr=1-1-spell Perhaps not the immediate answer you were looking for, but might be worthwile if you're going to be doing a lot of this. (I do). All the Best, Ross Dunne -- View this message in context: http://r.789695.n4.nabble.com/Unbalanced-Mixed-Linear-Models-With-Nested-Stratum-tp3263969p3276669.html Sent from the R help mailing list archive at Nabble.com.