[R] GAMM in mgcv - degrees of freedom for smooth terms

SwainD@dfo-mpo.gc.ca SwainD at dfo-mpo.gc.ca
Wed Apr 13 20:26:31 CEST 2005


Is it possible to set the degrees of freedom for the smooth term in a gamm
to a  specfic value?
This can be done using gam in mgcv as follows:
	tst.gam<-gam(y~s(x, k=6, fx=T))
However, this doesn't seem to work with gamm:
	tst.gamm<-gamm(y~s(x, k=6, fx=TRUE, bs="cr"))
Instead, this results in the following error message:
	Error in parse(file, n, text, prompt) : parse error

Similarly,
tst.gamm<-gamm(y~s(x, k=5, fx=T), random=list(grp=~1))
Error in FUN(X[[1]], ...) : Elements in object must be formulas or pdMat
objects

I am using mgcv 1.2-3 with Windows XP.

Thanks,
Doug Swain




More information about the R-help mailing list