[R] Error using mgcv package

From: spime <sabya23_at_gmail.com>
Date: Mon, 11 Jun 2007 03:30:27 -0700 (PDT)

Hi all,

I need some solution in the following problem. The following error appears when i use "mgcv" package for implementing GAM. But the same formula works fine in "gam" package.

> model.gam <- gam(formula = RES ~

> CAT01+s(NUM01,5)+CAT02+CAT03+s(NUM02,5)+CAT04+

+ CAT05+s(NUM03,5)+CAT06+CAT07+s(NUM04,5)+CAT08+s(NUM05,5)+CAT09+
+ CAT10+s(NUM06,5)+CAT11+NUM07+CAT12+CAT13,
+ family = binomial(link = logit), data = train.data,na.action = na.exclude,
+ control = list(epsilon = 0.001,bf.epsilon = 0.001, maxit = 50,
+ bf.maxit = 10, trace = F))

Error in terms.formula(reformulate(term[i])) :

        invalid model formula in ExtractVars

And after deleting df's

model.gam <- gam(formula = RES ~ CAT01+s(NUM01)+CAT02+CAT03+s(NUM02)+CAT04+
+ CAT05+s(NUM03)+CAT06+CAT07+s(NUM04)+CAT08+s(NUM05)+CAT09+
+ CAT10+s(NUM06)+CAT11+NUM07+CAT12+CAT13,
+ family = binomial(link = logit), data = train.data)

Error in smooth.construct.tp.smooth.spec(object, data, knots) :

        A term has fewer unique covariate combinations than specified maximum degrees of freedom  

Can anybody show me some light in this case!!!

Thanks in advance.

View this message in context: http://www.nabble.com/Error-using-mgcv-package-tf3900783.html#a11058255
Sent from the R help mailing list archive at Nabble.com.

R-help_at_stat.math.ethz.ch mailing list
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
Received on Mon 11 Jun 2007 - 10:35:06 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Tue 12 Jun 2007 - 09:31:54 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.