Message-ID: <494c85560903041004t6f3738a3p2433722fbd3278e9@mail.gmail.com>
Date: 2009-03-04T18:04:28Z
From: Las dA
Subject: 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!