[R] lme, spline

Farhad Shokoohi statfar at gmail.com
Tue Jun 15 15:28:43 CEST 2010


Dear All,
I revise my question about the problem I have.
Take a look at the article 
http://www.jstatsoft.org/v09/i01
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 getGroups.data.frame(dataMix, groups) :
Invalid formula for groups

Let me know what's wrong?
Best
-- 
View this message in context: http://r.789695.n4.nabble.com/lme-spline-tp2255500p2255903.html
Sent from the R help mailing list archive at Nabble.com.



More information about the R-help mailing list