predict2.bart: predict() for spatial use of BART models

View source: R/predict.R

predict2.bartR Documentation

predict() for spatial use of BART models

Description

A predict() wrapper for combining BART models with spatial input data, to generate a Raster or RasterStack of predicted outputs. This now includes the ability to predict from random intercept models, which can be used to deal with clustering in space and time of outcome variables!

Usage

predict2.bart(
  object,
  x.layers,
  quantiles = c(),
  ri.data = NULL,
  ri.name = NULL,
  ri.pred = FALSE,
  splitby = 1,
  quiet = FALSE
)

Arguments

object

A BART model objector riBART model object generated by the dbarts package

x.layers

An object of class RasterStack

quantiles

Include the extraction of quantiles (e.g. 5% and 95% credible interval) from the posterior

ri.data

If 'object' is a riBART model, this gives either one consistent value (e.g. a prediction year) or a RasterLayer for the random effect

ri.name

The name of the random intercept in the riBART model

ri.pred

Should the random intercept be *included* in the prediction value or dropped? Defaults to FALSE (treats the random intercept as noise to be excluded)

splitby

If set to a value higher than 1, will split your dataset into approximately n divisible chunks

quiet

No progress bars


cjcarlson/embarcadero documentation built on Sept. 9, 2023, 10:47 p.m.