[R] help with GAM
Las dA
lassie8183 at gmail.com
Wed Mar 4 19:04:28 CET 2009
Hi
I'm trying to do a GAM analysis and have the following codes entered
into R (density is = sample number, alive are the successes)
density<-as.real(density)
y<-cbind(alive,density-alive)
library(mgcv)
m1<-gam(y~s(density),binomial)
at which point I get the following error message
Error in smooth.construct.tp.smooth.spec(object, dk$data, dk$knots) :
A term has fewer unique covariate combinations than specified maximum
degrees of freedom
What am I doing wrong? Please help!
Thanks!
More information about the R-help
mailing list