Re: [R] Error running lme.

From: Doran, Harold <>
Date: Fri 15 Jul 2005 - 03:40:56 EST


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,

-----Original Message-----
[] On Behalf Of John Sorkin Sent: Thursday, July 14, 2005 1:05 PM
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.

> fit1lme<-lme(Velocity~time,data=gate)
Error in, 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  


        [[alternative HTML version deleted]] mailing list PLEASE do read the posting guide! mailing list PLEASE do read the posting guide! Received on Fri Jul 15 03:47:09 2005

This archive was generated by hypermail 2.1.8 : Fri 03 Mar 2006 - 03:33:40 EST