Dear R users,
I'm new to both R and to this list and would like to get
advice on how to build generalized additive models in R.
Based on the description of gam, which I found on the R
website, I specified the following model:
model1<-gam(ST~s(MOWST1),family=binomial,data=strikes.S),
in which ST is my binary response variable and MOWST1 is a
categorical independent variable.
I get the following error message:
Error in smooth.construct.tp.smooth.spec(object, data,
knots) :
NA/NaN/Inf in foreign function call (arg 1)
In addition: Warning messages:
1: argument is not numeric or logical: returning NA in:
mean.default(xx)
2: - not meaningful for factors in: Ops.factor(xx,
shift[i])
I would greatly appreciate if someone could tell me what I
did wrong. Can I use categorical independents in gam at
all?
Many thanks,
Istvan
______________________________________________
[email protected] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html