OK, try... model3=gam(Symptoms~as.factor(txerad)+as.factor(maritalStatus),family=binomial,data=data2) or model3=gam(data2$Symptoms~as.factor(data2$txerad)+as.factor(data2$maritalSt atus),family=binomial) ... both types of construction work with the current mgcv:gam (and with glm). Your construction doesn't work with the current mgcv:gam (or the current glm).
On Monday 06 December 2010 12:01, Stressed1985 wrote: > Ok, i just tried this: > > library(mgcv) > model3=gam(data2$Symptoms~as.factor(data2$txerad)+as.factor(data2$maritalSt >atus),family=binomial,data=data2) > > And im still getting this error! > > Error in dl[[i]] : subscript out of bounds -- > Simon Wood, Mathematical Sciences, University of Bath, Bath, BA2 7AY UK > +44 1225 386603 www.maths.bath.ac.uk/~sw283 ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.