extract_stan | R Documentation |
stanfit
object implemented in rstan
packageExtract chains of an stanfit
object implemented in rstan
package
extract_stan(
object,
pars,
permuted = TRUE,
inc_warmup = FALSE,
include = TRUE,
...
)
object |
a |
pars |
n optional character vector providing the parameter names
(or other quantity names) of interest. If not specified, all parameters
and other quantities are used. The log-posterior with name l |
permuted |
a logical scalar indicating whether the draws
after the |
inc_warmup |
a logical scalar indicating whether to include the
warm-up draws. This argument is only relevant if permuted is |
include |
a logical scalar indicating whether the parameters named in pars should be included (TRUE) or excluded (FALSE). |
... |
Further arguments passed to |
a list with the posterior samples of the provided parameters.
Asael Alonzo Matamoros
# Fitting a GARCH(1,1) model
dat = garch(ipc,order = c(1,1,0))
fit2 = varstan(dat,iter = 500,chains = 1)
# Extracting the mean parameter
mu0 = extract_stan(fit2,pars = "mu0")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.