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