John

Your model is not properly specified for lme. You have not included any
random effects or a grouping variable. Let me assume just for sake of
argument that you want to include a random effect for the intercept and
for time. Your lme specification would be 

> fm1 <- lme(Velocity~time, random=~time|ID, gate)

Where ID is a grouping variable. 

I would encourage you to work with lmer, which is now found in the
Matrix package. The call to lmer differs slightly from lme,

> fm1 <- lmer(Velocity~time + (time|ID), gate) 

I hope this is helpful,
Harold

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of John Sorkin
Sent: Thursday, July 14, 2005 1:05 PM
To: [email protected]
Subject: [R] Error running lme.

I am trying to fit lme using R 2.1.1 under Windows 2k. 
I am getting the following message noted below. 
Any suggestions that would help me correct my error would be greatly
appreciated.
Thanks,
John
 
> fit1lme<-lme(Velocity~time,data=gate)
Error in getGroups.data.frame(dataMix, groups) : 
        Invalid formula for groups

 
John Sorkin M.D., Ph.D.
Chief, Biostatistics and Informatics
Baltimore VA Medical Center GRECC and
University of Maryland School of Medicine Claude Pepper OAIC
 
University of Maryland School of Medicine Division of Gerontology
Baltimore VA Medical Center 10 North Greene Street GRECC (BT/18/GR)
Baltimore, MD 21201-1524
 
410-605-7119
-- NOTE NEW EMAIL ADDRESS:
[EMAIL PROTECTED]

        [[alternative HTML version deleted]]

______________________________________________
[email protected] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide!
http://www.R-project.org/posting-guide.html

______________________________________________
[email protected] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html

Reply via email to