fitted.mcmc_output: Fitted for State Space Model

View source: R/fitted.R

fitted.mcmc_outputR Documentation

Fitted for State Space Model

Description

Returns summary statistics from the posterior predictive distribution of the mean.

Usage

## S3 method for class 'mcmc_output'
fitted(object, model, probs = c(0.025, 0.975), ...)

Arguments

object

Results object of class mcmc_output from run_mcmc based on the input model.

model

A bssm_model object.

probs

Numeric vector defining the quantiles of interest. Default is c(0.025, 0.975).

...

Ignored.

Examples

prior <- uniform(0.1 * sd(log10(UKgas)), 0, 1)
model <- bsm_lg(log10(UKgas), sd_y = prior, sd_level =  prior,
  sd_slope =  prior, sd_seasonal =  prior, period = 4)
fit <- run_mcmc(model, iter = 1e4)
res <- fitted(fit, model) 
head(res)


bssm documentation built on Nov. 2, 2023, 6:25 p.m.