I am trying to create a BRT model using the dismo package. When I simplify my model following the cran tutorial, and then try to respecify it I get an error saying: "Error in data[, gbm.x, drop = FALSE] : incorrect number of dimensions".
I am not sure what the problem is and any help would be appreciated.
> BRTsynoptic <- gbm.step(data=synoptic, gbm.x = 2:14, gbm.y = 1,
family = "bernoulli", tree.complexity = 10,
learning.rate = .001, bag.fraction = 0.75)
summary(BRTsynoptic)
#simplify the model
synoptic.simp <- gbm.simplify(BRTsynoptic, n.drops = 5)
#assign new model with simplification
synopticss.simp <- gbm.step(BRTsynoptic,
gbm.x=synoptic.simp$pred.list[[4]], gbm.y=1,
tree.complexity=10,learning.rate=0.001)