logistic regression - Issue with gam function in R -


i'm trying fit generalized additive logistic regression model, i'm getting strange error:

gam_object = gam(event ~ s(time) + ., data = lapse_train, family = "binomial")   error in terms.formula(gf, specials = c("s", "te", "ti", "t2")) : '.' in formula , no 'data' argument 

why telling me there no data argument here when there is?

note error message call terms.formula() called inside function. function doesn't see data= parameter passed gam().

if check out ?formula.gam page you'll see that

the formulae supplied gam supplied glm except smooth terms, s, te, ti , t2 can added right hand side (and . not supported in gam formulae).

you expand formula before passing gam via standard terms() function. example

gam_object <- gam(terms(event ~ s(time) + ., data=lapse_train),      data = lapse_train, family = "binomial")  

you didn't supply sort of reproducible example it's not possible verify work you.


Comments

Popular posts from this blog

javascript - Bootstrap Popover: iOS Safari strange behaviour -

Magento/PHP - Get phones on all members in a customer group -

Website Login Issue developed in magento -