Bayesian Inference of Linear-Gaussian State Space Models
# S3 method for gssm
run_mcmc(object, n_iter, type = "full",
n_burnin = floor(n_iter/2), n_thin = 1, gamma = 2/3,
target_acceptance = 0.234, S, end_adaptive_phase = TRUE,
n_threads = 1, seed = sample(.Machine$integer.max, size = 1), ...)# S3 method for bsm
run_mcmc(object, n_iter, type = "full",
n_burnin = floor(n_iter/2), n_thin = 1, gamma = 2/3,
target_acceptance = 0.234, S, end_adaptive_phase = TRUE,
n_threads = 1, seed = sample(.Machine$integer.max, size = 1), ...)
# S3 method for ar1
run_mcmc(object, n_iter, type = "full",
n_burnin = floor(n_iter/2), n_thin = 1, gamma = 2/3,
target_acceptance = 0.234, S, end_adaptive_phase = TRUE,
n_threads = 1, seed = sample(.Machine$integer.max, size = 1), ...)
# S3 method for lgg_ssm
run_mcmc(object, n_iter, type = "full",
n_burnin = floor(n_iter/2), n_thin = 1, gamma = 2/3,
target_acceptance = 0.234, S, end_adaptive_phase = TRUE,
n_threads = 1, seed = sample(.Machine$integer.max, size = 1), ...)
Model object.
Number of MCMC iterations.
Type of output. Default is "full"
, which returns
samples from the posterior \(p(\alpha, \theta)\). Option "summary"
does not simulate
states directly but computes the posterior means and variances of states using
fast Kalman smoothing. This is slightly faster, memory efficient and
more accurate than calculations based on simulation smoother. Using option "theta"
will only
return samples from the marginal posterior of the hyperparameters \(\theta\).
Length of the burn-in period which is disregarded from the
results. Defaults to n_iter / 2
. Note that all MCMC algorithms of bssm
used adaptive MCMC during the burn-in period in order to find good proposal.
Thinning rate. All MCMC algorithms in bssm
use the jump chain
representation, and the thinning is applied to these blocks.
Defaults to 1.
Tuning parameter for the adaptation of RAM algorithm. Must be between 0 and 1 (not checked).
Target acceptance ratio for RAM. Defaults to 0.234.
Initial value for the lower triangular matrix of RAM algorithm, so that the covariance matrix of the Gaussian proposal distribution is \(SS'\). Note that for some parameters (currently the standard deviation and dispersion parameters of bsm models) the sampling is done for transformed parameters with internal_theta = log(1 + theta).
If TRUE
(default), $S$ is held fixed after the burnin period.
Number of threads for state simulation.
Seed for the random number generator.
Ignored.