[R] GAM question
HILLARY ROBISON
hrobison at unr.nevada.edu
Thu Jun 3 20:15:25 CEST 2004
I am trying to use R to do a weighted GAM with PA (presence/random) as the
response variable (Y, which is a 0 or a 1) and ASPECT (values go from
0-3340), DEM (from 1500-3300), HLI (from 0-5566), PLAN (from -3 to 3),
PROF (from -3 to 3), SLOPE (from 100-500) and TRI (from 0-51) as
predictor variables (Xs). I need to weight each observation by its WO
value (from 0.18 to 0.98). I have specified the following models in R
(see below), but I can't figure out what the R reported errors plainly
mean. One of the errors seems to tell me my dataset is too big (it's
109,729 rows by 16 columns) - is this possible? Given what I am trying to
accomplish (a weighted, logistic GAM with 7 variables), am I specifying my
model correctly? I would like to attach my dataset (it's 2,064 KB
as a WinZip file), but I don't know if it'll go through to the list given
the HTML & attachment contraints of the list... I even tried a weighted,
logistic GLM with the seven variables to see if that would work and if so,
perhaps it was a GAM problem. I also tried a logistic, weighted GAM with
one variable to see if that would work. My next step while I wait to
hear back from the list is to try a dummy dataset that is small to see if
a weighted, logistic GAM with seven variables will work at all or if I am
speciying the model correctly. Would anyone be willing to have my dataset
sent so they can check it out if that would help solve the issue? Thank you!
Hillary (hrobison at unr.nevada.edu)
> # trial, all, weighted
> topo8 <- gam(PA ~ s(SLOPE10) + s(ASPECT10) + s(GYADEMPLUS) + s(TRI) +
s(HLI) + s(PLAN10) + s(PROF10), family=binomial, data=topox, weights = w0)
Warning in eval(expr, envir, enclos) : non-integer #successes in a
binomial glm!
Error: cannot allocate vector of size 60865 Kb
> topo9 <- glm(PA ~ SLOPE10 + ASPECT10 + GYADEMPLUS + TRI + HLI + PLAN10 +
PROF10, family=binomial, data=topox, weights = w0)
Warning in eval(expr, envir, enclos) : non-integer #successes in a
binomial glm!
> # trial, weighted, slope only
> topo10 <- gam(PA ~ s(SLOPE10), family=binomial, data=topox, weights =
w0)
Warning in eval(expr, envir, enclos) : non-integer #successes in a
binomial glm!
More information about the R-help
mailing list