% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/methods.R
\name{predict.ShrinkageTrees}
\alias{predict.ShrinkageTrees}
\title{Posterior predictive inference for a ShrinkageTrees model}
\usage{
\method{predict}{ShrinkageTrees}(object, newdata, level = 0.95, ...)
}
\arguments{
\item{object}{A fitted \code{ShrinkageTrees} model object.}

\item{newdata}{A matrix (or object coercible to one) of new covariates with
the same number of columns as the training data.}

\item{level}{Credible interval width. Default \code{0.95}.}

\item{...}{Currently unused.}
}
\value{
A \code{ShrinkageTreesPrediction} object with elements:
\describe{
\item{mean}{Posterior mean predictions (length \code{nrow(newdata)}).}
\item{lower}{Lower credible interval bound.}
\item{upper}{Upper credible interval bound.}
\item{n}{Number of test observations.}
\item{level}{Credible level used.}
\item{outcome_type}{Outcome type inherited from the fitted model.}
\item{timescale}{Timescale inherited from the fitted model (survival only).}
\item{predictions_sample}{(Survival only) \code{N_post} x \code{n}
matrix of posterior predictive draws on the original scale.}
\item{sigma}{(Survival only) Posterior draws of sigma on the log-time
scale (length \code{N_post}).}
}
}
\description{
Re-runs the MCMC sampler on new covariate data using the stored training
data and hyperparameters, returning posterior mean predictions and credible
interval bounds.
}
\seealso{
\code{\link{HorseTrees}}, \code{\link{ShrinkageTrees}},
\code{\link{print.ShrinkageTreesPrediction}},
\code{\link{summary.ShrinkageTreesPrediction}},
\code{\link{plot.ShrinkageTreesPrediction}}
}
