% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/gbass.R
\name{predict.gbass}
\alias{predict.gbass}
\title{Predict method for GBASS objects}
\usage{
\method{predict}{gbass}(
  object,
  newdata = NULL,
  mcmc.use = NULL,
  predictive = TRUE,
  bias_correct = FALSE,
  samples = 1,
  ...
)
}
\arguments{
\item{object}{an object of class "gbass" (including subclasses like
"tbass", "qbass", "nwbass")}

\item{newdata}{a matrix of predictor variables. Defaults to training inputs.}

\item{mcmc.use}{optional vector indicating which posterior draws to use.}

\item{predictive}{logical. If TRUE, return posterior predictive draws.
If FALSE, return draws of the linear predictor.}

\item{bias_correct}{logical. Ignored unless predictive = FALSE.
If TRUE, return the posterior mean response rather than just the linear predictor.}

\item{samples}{Integer giving the number of predictive samples to generate
per retained MCMC draw when \code{predictive = TRUE}. Ignored when
\code{predictive = FALSE}. Default is \code{1}.}

\item{...}{Additional graphical arguments (not used)}
}
\value{
a matrix with rows corresponding to posterior draws and columns
corresponding to rows of newdata.
}
\description{
Returns posterior draws of either:
(i) the linear predictor / mean surface, or
(ii) the full posterior predictive distribution.
}
\details{
If predictive = FALSE and bias_correct = FALSE, this returns draws of B(x)a.

If predictive = FALSE and bias_correct = TRUE, this returns draws of
B(x)a + E(error | posterior draw),
i.e. the mean response under the fitted GBASS error model.

If predictive = TRUE, this returns posterior predictive draws by simulating
a fresh latent local variance v_new and Gaussian draw for each posterior sample.

For qbass objects, bias_correct = TRUE is usually not what you want, because
qbass is typically being used for quantile regression rather than mean regression.

Currently, posterior predictive draws are implemented for GIG-based models.
If the fitted object uses a GBP prior for v, predictive = TRUE will stop.
}
