[ede2d4]: / man / posterior_predict.hsstan.Rd

Download this file

39 lines (33 with data), 1.3 kB

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/postestimation.R
\name{posterior_predict.hsstan}
\alias{posterior_predict.hsstan}
\alias{posterior_predict}
\title{Posterior predictive distribution}
\usage{
\method{posterior_predict}{hsstan}(object, newdata = NULL, nsamples = NULL, seed = NULL, ...)
}
\arguments{
\item{object}{An object of class \code{hsstan}.}
\item{newdata}{Optional data frame containing the variables to use to
predict. If \code{NULL} (default), the model matrix is used. If
specified, its continuous variables should be standardized, since
the model coefficients are learnt on standardized data.}
\item{nsamples}{A positive integer indicating the number of posterior samples
to use. If \code{NULL} (default) all samples are used.}
\item{seed}{Optional integer defining the seed for the pseudo-random number
generator.}
\item{...}{Currently ignored.}
}
\value{
A matrix of size \code{S} by \code{N}, where \code{S} is the number of simulations from
the posterior predictive distribution, and \code{N} is the number of data points.
}
\description{
Draw from the posterior predictive distribution of the outcome.
}
\examples{
\dontshow{utils::example("hsstan", echo=FALSE)}
# continued from ?hsstan
posterior_predict(hs.biom)
}