Skip to content
Back to formatted view

Raw Message

Message-ID: <038411da8d95468d8ba60e12e1e028a6@BN1PR08MB138.namprd08.prod.outlook.com>
Date: 2014-02-24T16:10:43Z
From: Alex Dunn
Subject: groupedData in nlme

Dear All,

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)

Thanks,
Alex