[R-sig-eco] GAM - Cyclic splines
SamiC
samantha.cox at plymouth.ac.uk
Thu Jan 22 20:40:26 CET 2015
Hi,
I am trying to use cyclic splines in gamm4 to model year day. I have data
running from say day 6 to day 300 but I want to specify the outer limits of
the data are at 0 and 366. I dont want to fix the inner position of the
knots however (I allow for a total of 5 knots). Is there a way to do this?
I also have other explanatory variables in the model that are not cyclic.
Example:
Model<-gamm4(Y~s(X1,fx=FALSE,k=5,bs="cc")+s(X2,fx=FALSE, k=5,
bs='cr')+offset(log(X3)),random=~(1|X4),data=data,family=poisson)
Finally when I try to plot the predictions on the response scale the values
predicted at 0 and 366 are vastly different and do not match, as when
outputs using plot(Model$gam,se=TRUE).
Any help on this would be much appreciated.
Cheers
Sam
--
View this message in context: http://r-sig-ecology.471788.n2.nabble.com/GAM-Cyclic-splines-tp7579269.html
Sent from the r-sig-ecology mailing list archive at Nabble.com.
More information about the R-sig-ecology
mailing list