% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/adaptive_chaos.R
\name{predict.adaptive_khaos}
\alias{predict.adaptive_khaos}
\title{Predict Method for class adaptive_khaos}
\usage{
\method{predict}{adaptive_khaos}(
  object,
  newdata = NULL,
  mcmc.use = NULL,
  nugget = FALSE,
  nreps = 1,
  ...
)
}
\arguments{
\item{object}{An object returned by the \code{adaptive_khaos()} function.}

\item{newdata}{A dataframe of the same dimension as the training data.}

\item{mcmc.use}{Which posterior samples should be used for prediction?}

\item{nugget}{Logical. Should predictions include error?}

\item{nreps}{How many predictions should be taken for each mcmc sample (ignored when \code{nugget = FALSE}).}

\item{...}{Additional arguments to predict}
}
\value{
A numeric matrix of posterior predictive samples, with rows corresponding
to samples and columns corresponding to observations.
}
\description{
See \code{adaptive_khaos()} for details.
}
\details{
Predict function for adaptive_khaos object.
}
\examples{
\donttest{
X <- lhs::maximinLHS(100, 2)
f <- function(x) 10.391*((x[1]-0.4)*(x[2]-0.6) + 0.36)
y <- apply(X, 1, f) + stats::rnorm(100, 0, 0.1)
fit <- adaptive_khaos(X, y)
predict(fit)
}
}
\references{
Francom, Devin, and Bruno Sanso. "BASS: An R package for fitting and performing sensitivity analysis of Bayesian adaptive spline surfaces." Journal of Statistical Software 94.LA-UR-20-23587 (2020).
}
