[R] mgcv package, problems with NAs in gam
grace
sololorox at hotmail.com
Fri Aug 24 23:36:21 CEST 2012
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) data to do anything meaningful*
Is there a specific reason it would do this? I have tried using various
actions on NAs, na.pass etc, as well as asking it to turn all NAs to 0 but
to no avail.
I would post the data here but its rather long, basically 28x104 matrix of
0/1 with headers 'v1:v28' .The summary for the data comes up fine, it's just
the model that isn't working.
However if I run using:
*model<-gam(v1~v2, data=bats, family=negbin)
*
it tends to work.
Any help is seriously appreciated as I have a deadline and have been trying
this for days,
Thanks!
--
View this message in context: http://r.789695.n4.nabble.com/mgcv-package-problems-with-NAs-in-gam-tp4641253.html
Sent from the R help mailing list archive at Nabble.com.
More information about the R-help
mailing list