Re: [R] Help with gam

2011-11-10 Thread Paula McGee
From: Uwe Ligges mailto:ligges_at_statistik.tu-dortmund.de?Subject=Re:%20[R]%20Help%20with%2 0gam> > Date: Wed, 11 May 2011 19:08:38 +0200 On 11.05.2011 17:22, Zsolt Macskasi wrote: > Hi, > > I am a brand new user of R

Re: [R] Help with gam

2011-05-11 Thread Uwe Ligges
On 11.05.2011 17:22, Zsolt Macskasi wrote: Hi, I am a brand new user of R and I am trying to use the gam procedure with the package mgcv. I did a bit of my homework by consulting the R-manual, as well as the mgcv manual written by Simon Wood. I admit it was just a few hours, but what I am t

Re: [R] Help with GAM (mgcv)

2010-12-06 Thread Stressed1985
Ye Thank you so much, finally i have something to look at. Just got to interpret the bloomin' thing now! -- View this message in context: http://r.789695.n4.nabble.com/Help-with-GAM-mgcv-tp3074165p3074414.html Sent from the R help mailing list archive at Nabble.com. ___

Re: [R] Help with GAM (mgcv)

2010-12-06 Thread Simon Wood
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 constructi

Re: [R] Help with GAM (mgcv)

2010-12-06 Thread Stressed1985
Ok, i just tried this: library(mgcv) model3=gam(data2$Symptoms~as.factor(data2$txerad)+as.factor(data2$maritalStatus),family=binomial,data=data2) And im still getting this error! Error in dl[[i]] : subscript out of bounds -- View this message in context: http://r.789695.n4.nabble.com/Help-w

Re: [R] Help with GAM (mgcv)

2010-12-06 Thread Simon Wood
Probably the problem is with trying to smooth maritalStatus, which is a factor variable. Smooths are generally functions of metric variables (i.e. variables that take numerical values, where the ordering is meaningful). You can have random effect smooths and markov random field smooths in more r

Re: [R] Help with GAM (mgcv)

2010-12-06 Thread Stressed1985
Thank you for your reply! It says: This is mgcv 1.5-5 . For overview type `help("mgcv-package")'. Its version: R 2.9.2 And summary(data2) gives: id age bmi siblingsgender Min. : 1.0 Min. :32.19 Min. :16.41 Min. :0.000 Fem

Re: [R] Help with GAM (mgcv)

2010-12-06 Thread Simon Wood
On Monday 06 December 2010 09:33, Stressed1985 wrote: > Please help! Im trying to run a GAM: > > model3=gam(data2$Symptoms~as.factor(data2$txerad)+s(data2$maritalStatus),fa >mily=binomial,data=data2) > > But keep getting this error: > Error in dl[[i]] : subscript out of bounds > > Can someone pleas

Re: [R] help with GAM

2009-03-04 Thread Daniel Malter
Type unique(density) How many different unique values does density take? The wiggliness of the smooth term consumes degrees of freedom. That is, the more wiggly your smooth term, the more DFs it consumes. If you get the error you got, you have to reduce the degrees of freedom alloted to the smooth