[R] groupedData in nlme
Alex.Dunn at researchintoaction.com
Mon Feb 24 17:10:43 CET 2014
I have a quick question regarding using groupedData in the nlme package.
Can I add more than one predictor in the groupedData formula? I can't seem to get this to work and all the examples in Pinheiro and Bates show just one predictor in the groupedData formula.
Can I use a more complex model when I have only one predictor in the groupedData formula?
Currently I am using the following formula:
grouped<-groupedData(y ~ 1 | ID, data = dataset)
I would like to run the following models:
fixed<-lme(y ~ -1 + x1 + x3 + x3, data = grouped)
randome<-lme(y ~ -1 + x1 + x2 + x3, random = list(~x1|ID, ~x2|ID, ~x3|ID), data=grouped)
More information about the R-help