https://github.com/cran/bayestestR
Revision d73e4a2afcfbd6402c11716877e8f7466f309ef4 authored by Dominique Makowski on 22 October 2020, 13:40:02 UTC, committed by cran-robot on 22 October 2020, 13:40:02 UTC
1 parent 1b89ec8
Raw File
Tip revision: d73e4a2afcfbd6402c11716877e8f7466f309ef4 authored by Dominique Makowski on 22 October 2020, 13:40:02 UTC
version 0.7.5
Tip revision: d73e4a2
simulate_prior.Rd
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/simulate_priors.R
\name{simulate_prior}
\alias{simulate_prior}
\title{Returns Priors of a Model as Empirical Distributions}
\usage{
simulate_prior(model, n = 1000, ...)
}
\arguments{
\item{model}{A \code{stanreg}, \code{stanfit}, or \code{brmsfit} object.}

\item{n}{Size of the simulated prior distributions.}

\item{...}{Currently not used.}
}
\description{
Transforms priors information to actual distributions.
}
\examples{
\dontrun{
library(bayestestR)
if (require("rstanarm")) {
  model <- stan_glm(mpg ~ wt + am, data = mtcars, chains = 1, refresh = 0)
  simulate_prior(model)
}
}
}
\seealso{
\code{\link{unupdate}} for directly sampling from the prior
  distribution (useful for complex priors and designs).
}
back to top