btcmodel: Modelo estrutural tendencia e ciclo bayesiano

Description Usage Arguments Value References

View source: R/btcmodel.R

Description

Estima o modelo estutrural de componentes nao observados para a tendencia estocastica e ciclo (gap) estacionario de forma bayesiana com MCMC e Gibbs sample. Para detalhes ver secao 4.6.1 de Petris e Petrone (2009).

Usage

1
2
3
btcmodel(y, a.theta, b.theta, dV = 1e-07, m0 = rep(0, 4), C0 = diag(x =
  c(rep(1e+07, 2), rep(1, 2))), n.sample = 1, thin = 0,
  save.states = FALSE)

Arguments

y

data vector or univariate time series

a.theta

prior mean of system precisions (recycled, if needed)

b.theta

prior variance of system precisions (recycled, if needed)

dV

the variance, or the diagonal elements of the variance matrix in the multivariate case, of the observation noise. V is assumed to be diagonal and it defaults to zero

m0

the expected value of the pre-sample state vector

C0

the variance matrix of the pre-sample state vector

n.sample

requested number of Gibbs iterations

thin

discard thin iterations for every saved iteration

save.states

should the simulated states be included in the output?

Value

a list of Markov chain Monte Carlo (MCMC) simulated values.

phi

simulated values of the AR parameter

vars

simulated values of the unknown variance

theta

simulated values of the state vectors

References

PETRIS, G.; PETRONE, S.; CAMPAGNOLI, P. Dynamic Linear Models with R. New York: Springer Science, 2009.


santoscs/mecnost documentation built on May 29, 2019, 1:48 p.m.