Re: [R] lme, spline

From: Farhad Shokoohi <>
Date: Tue, 15 Jun 2010 06:28:43 -0700 (PDT)

Dear All,
I revise my question about the problem I have. Take a look at the article
and download the attached code.
try to run one of the codes for example section 2.1 in R here is the code

fossil <- read.table("fossil.dat",header=T) x <- fossil$age
y <- 100000*fossil$strontium.ratio
knots <- seq(94,121,length=25)

n <- length(x)
X <- cbind(rep(1,n),x)
Z <- outer(x,knots,"-")
Z <- Z*(Z>0)

fit <- lme(y~-1+X,random=pdIdent(~-1+Z))

there is an error which prevents running the lme function. The error is something like this
Error in, groups) :
Invalid formula for groups

Let me know what's wrong?

View this message in context:
Sent from the R help mailing list archive at

______________________________________________ mailing list
PLEASE do read the posting guide
and provide commented, minimal, self-contained, reproducible code.
Received on Tue 15 Jun 2010 - 19:06:09 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Tue 15 Jun 2010 - 22:40:32 GMT.

Mailing list information is available at Please read the posting guide before posting to the list.

list of date sections of archive