regimeSummary: Regime probability summaries and regime duration estimates...

Description Usage Arguments Details Value Author(s) References See Also Examples

View source: R/regimeSummary.R

Description

Provides summary and quantile computations for regime probabilities and regime durations based on MSBVAR MCMC output

Usage

1
regimeSummary(x, quantiles = c(0.025, 0.25, 0.5, 0.75, 0.975))

Arguments

x

output from gibbs.msbvar, the MCMC sampler for the MSBVAR models

quantiles

quantiles one wants to compute, as is done in the coda package. Defaults are as given above.

Details

This function is mainly a wrapper for calls to the coda package to summarize the MCMC output for the transition matrix of an MSBVAR model estimated from gibbs.msbvar. It adds labels to the output so one know which regime is which in the output. In the summary of the transition matrix Q's elements q(ij) for the transition from regime i to regime j.

The ergodic regime probabilities are computed for draw k of the MSBVAR MCMC sampler as described in Kim and Nelson (1999):

eta <- solve(rbind(cbind(diag(h-1) - t(Q)[1:(h-1),1:(h-1)], t(Q)[1:(h-1),h]), rep(1,h)))

This is the gives N2 draws of the ergodic probabilities of being in regime k. These are summarized again using coda functions.

Finally, the ergodic regime probabilities can be used to estimate expected long run regime durations. For eta(k) the expected regime duration is 1/(1-eta(k). This again is summarized over the N2 draws using coda functions.

Value

Invisible list with 3 elements:

Q.summary

Summary and quantiles of the x$Q.sample draws of the transition matrix

lrQ

Summary and quantiles of the long run or ergodic regime probabilities

durations

Summary and quantiles of the estimated regime durations

Author(s)

Patrick T. Brandt

References

Kim, Chang-Jin and Charles R. Nelson. 1999. State-Space Models with Regime Switching: Classical and Gibbs-Sampling Approaches with Applications. Cambridge: MIT Press.

See Also

gibbs.msbvar, plotregimeid, msbvar

Examples

1
2
3
4
## Not run: 
regimeSummary(x)

## End(Not run)

MSBVAR documentation built on May 30, 2017, 1:23 a.m.

Related to regimeSummary in MSBVAR...