help with GAM
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!