SwainD@dfo-mpo.gc.ca
2005-Apr-13 18:26 UTC
[R] GAMM in mgcv - degrees of freedom for smooth terms
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