Predicted values for models fitted with hSDM

# S3 method for hSDM
predict(object,newdata=NULL,type="mean",probs=c(0.025,0.975),...)

Arguments

object

An object of class "hSDM".

newdata

An optional data frame in which to look for variables with which to predict. If omitted, the fitted values are used.

type

Type of prediction. Can be "mean" for predictive posterior mean, "quantile" for producing sample quantiles from the predictive posterior corresponding to the given probabilities (see probs argument) or "posterior" for the full predictive posterior for each prediction. Using "quantile" or "posterior" might lead to memory problem depending on the number of predictions and the number of samples for the hSDM model's parameters.

probs

Numeric vector of probabilities with values in [0,1] and used when type="quantile".

...

Further arguments passed to or from other methods.

Value

Return a vector for the predictive posterior mean when type="mean", a data-frame with the mean and quantiles when type="quantile" or an mcmc object (see coda package) with posterior distribution for each prediction when type="posterior".

Author

Ghislain Vieilledent ghislain.vieilledent@cirad.fr

See also