predict.bayescomm:
Function to make predictions at new locations
Description
For each set of parameter values sampled by the model (including values of Z),
simulate the occurrence probabilities for each species at each new location.
Usage
"predict"(object, newdata, ...)
Arguments
object
A bayescomm object
newdata
A data.frame with the same columns as X from the original BC model
...
Further arguments passed to or from other methods.
Value
An array of occurrence probabilities.
Rows index locations. Columns index species. Slices index MCMC samples.
# load model from first examplem1 <- example(BC)[[1]]
# use the first five sites of the training data as newdatanewdata <- X[1:5, -1]
# get predictionsprob <- predict(m1, newdata)