MCMCpanic04: PANIC (2004) MCMC Non-Stationarity Tests on Common and...

Description Usage Arguments Value References

Description

This function performs an MCMC over the tests on the idiosyncratic and common component from PANIC (2004).

Usage

1
2
3
4
MCMCpanic04(x, nfac, k1, criteria = NULL,burn = 1000,
mcmc = 10000, thin = 10, verbose = 0, seed = NA,
lambda.start = NA, psi.start = NA, l0 = 0, L0 = 0, 
a0 = 0.001, b0 = 0.001, std.var = TRUE,...)

Arguments

x

An object of class xts with each column being a time series

nfac

An integer specifying the maximum number of factors allowed while estimating the factor model.

k1

an integer that is the maximum lag allowed in the ADF test.

criteria

a character vector of length one with a value of either IC1, IC2, IC3, AIC1, BIC1, AIC3, BIC3, or eigen. Choosing eigen makes the number of factors equal to the number of columns whose sum of eigenvalues is less than or equal to .5.

burn

Integer of the number of burn in iterators for the sampler

mcmc

Integer of the number of iterations in the sampler

thin

Integer of the thinning interval used in the simulation. mcmc must be divisible by this value.

verbose

A positive integer which determines whether or not the progress of the sampler is printed to the screen. If verbose is greater than 0 the iteration number and the factor loadings and uniquenesses are printed to the screen every verboseth iteration.

seed

The seed for the random number generator.

lambda.start

Starting values for the factor loading matrix Lambda.

psi.start

Starting values for the uniqueness

l0

The means of the independent Normal prior on the factor loadings

L0

A scalar or a matrix with the same dimensions as lambda. The precision (inverse variances) of the independent Normal prior on the factor loadings.

a0

scalar or a k-vector. Controls the shape of the inverse Gamma prior on the uniqueness.

b0

Controls the scale of the inverse Gamma prior on the uniqueness.

std.var

if TRUE the variables are rescaled to have zero mean and unit variance. Otherwise, the variables are rescaled to have zero mean, but retain their observed variances

...

extra parameters to pass to MCMCfactanal

Value

mcmc_tests An mcmc object containing the resampled tests on the common components as well as the test on the idiosyncratic component.

factor_mcmc The results from MCMCfactanal()

References

Bai, Jushan, and Serena Ng. 'A PANIC Attack on Unit Roots and Cointegration.' Econometrica 72.4 (2004): 1127-1177. Print.

Andrew D. Martin, Kevin M. Quinn, Jong Hee Park (2011). MCMCpack: Markov Chain Monte Carlo in R. Journal of Statistical Software. 42(9): 1-21. URL http://www.jstatsoft.org/v42/i09/.


PANICr documentation built on May 2, 2019, 4:40 a.m.