Hi all,
I would like to fit a gamm model of the form:
Y~X+X*f(z)
Where f is the smooth function and
With random effects on X and on the intercept.
So, I try to write it like this:
gam.lme<- gamm(Y~ s(z, by=X) +X, random=list(groups=pdDiag(~1+X)) )
but I get the error messag
Is X a numeric variable or a factor? If it's numeric try
gam.lme<- gamm(Y~ s(z, by=X), random=list(groups=pdDiag(~1+X)) )
... since otherwise the separate X term is confounded with s(z, by=X).
(gam detects such confounding and copes with it, but gamm can't).
Simon
On 17/03/11 17:47, I
Hi all,
I would like to fit a gamm model of the form:
Y~X+X*f(z)
Where f is the smooth function and
With random effects on X and on the intercept.
So, I try to write it like this:
gam.lme<- gamm(Y~ s(z, by=X) +X, random=list(groups=pdDiag(~1+X)) )
but I get the error messag
3 matches
Mail list logo