Re: [R] mgcv package, problems with NAs in gam

2012-08-25 Thread grace
Hi Simon, I'm trying to fit a negative binomial gam with no covariates, that therefore looks at the detection/non-detection data and nothing else. I thought having 1~1 as formula would allow the model to just estimate occurrence without looking at relationship between variables. On 25 Aug 20

Re: [R] mgcv package, problems with NAs in gam

2012-08-25 Thread Simon Wood
'gam' doesn't know what to do with the model formula '1 ~ 1' (i.e. "one tilde one"). What is it supposed to mean? 'glm' also does nothing meaningful in this case... ## code to load you data file into 'dat' omitted > model<-glm(1~1, data=dat) > model Call: glm(formula = 1 ~ 1, data = dat) Co

Re: [R] mgcv package, problems with NAs in gam

2012-08-25 Thread grace
I've attached the data to this message. http://r.789695.n4.nabble.com/file/n4641291/2005pip.csv 2005pip.csv -- View this message in context: http://r.789695.n4.nabble.com/mgcv-package-problems-with-NAs-in-gam-tp4641253p4641291.html Sent from the R help mailing list archive at Nabble.com.

Re: [R] mgcv package, problems with NAs in gam

2012-08-24 Thread Bert Gunter
Grace: Confession: I loved that error message! -- and it seems pretty clear to me. What does "to no avail" mean -- in particular, what happened when you changed your NA's to 0? Presumably you did not get the same error message, again, but something else, right? What else? Modulo the above vague

[R] mgcv package, problems with NAs in gam

2012-08-24 Thread grace
Hi there, I'm using presence-absence data in a gam (i.e. 0 or 1 as values) I am trying to run a gam with 'dummy covariates' i.e. 1~1 unfortunately my model: * model<-gam(1~1, data=bats, family=negbin)* keeps putting out: * Error in gam(1 ~ 1, data = bats, family = negbin) : Not enough (non-NA