[R-sig-Geo] Error running gbm.step in dismo package
Ned Horning
horning at amnh.org
Wed Jan 26 23:32:04 CET 2011
Hi -
I get the following error occasionally when I run gbm.step in the dismo:
--
Error in var(threshold.stats, use = "complete.obs") :
no complete element pairs
--
I also get several warnings such as:
--
3: In glm.fit(x = X, y = Y, weights = weights, start = start, etastart =
etastart, :
algorithm did not converge
4: In glm.fit(x = X, y = Y, weights = weights, start = start, etastart =
etastart, :
fitted probabilities numerically 0 or 1 occurred
5: In cor(y_i, u_i) : the standard deviation is zero
--
Here is the line I use to run gbm.step:
gbm_object <- gbm.step(data=model.data, gbm.x=9:45, gbm.y=1,
family="bernoulli",
tree.complexity=5, learning.rate=0.001, bag.fraction=0.5)
The response variable is presence/absence (0/1) data for a bird species.
When I run this with the full data set for particular bird species the
data.frame "model.data" has 371 rows (plots) and then the error does not
appear but I still get several warnings. When I run it on a subset of
only 93 rows (I'd like to do k-fold partitioning) I get the error and
warnings mentioned above. For what it's worth, this problem data subset
has 88 presences and only 5 absences. It appears that when I run this
for bird species with more of a balance of presences and absences I
don't get any errors or warnings.
Any thoughts or pointers?
All the best,
Ned
More information about the R-sig-Geo
mailing list