formSmpl: Form the Posterior Sample

Description Usage Arguments Value Note See Also Examples

Description

Form the joint posterior sampler from the MCMC output.

Usage

1
  formSmpl(MCMC, l.bi = 0, batch.size = 1)

Arguments

MCMC

object of the class mcmc.list (R package coda) or a list of matrices or a matrix.

l.bi

length of the burn-in phase.

batch.size

batching size used to diminish the autocorrelation within the chains.

Value

The joint posterior sample as an mcmc object (R package coda).

Note

Please cite the package in publications. Use citation("bayesGARCH").

See Also

bayesGARCH for the Bayesian estimation of the GARCH(1,1) model with Student-t innovations.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
  ## !!! INCREASE THE NUMBER OF MCMC ITERATIONS !!!

  ## LOAD DATA SET
  data(dem2gbp)
  y <- dem2gbp[1:750]

  ## RUN THE ESTIMATION
  MCMC <- bayesGARCH(y, control = list(n.chain = 2, l.chain = 100))

  ## FORM THE SAMPLE FROM THE MCMC OUTPUT
  smpl <- formSmpl(MCMC, l.bi = 50, batch.size = 2)

  ## POSTERIOR STATISTICS
  summary(smpl)

Example output

chain:  1  iteration:  10  parameters:  0.0413 0.1873 0.6672 80.0681 
chain:  1  iteration:  20  parameters:  0.0397 0.2532 0.6289 111.4176 
chain:  1  iteration:  30  parameters:  0.0601 0.2385 0.5648 128.3438 
chain:  1  iteration:  40  parameters:  0.0649 0.2043 0.5913 135.7295 
chain:  1  iteration:  50  parameters:  0.0517 0.2186 0.6215 125.522 
chain:  1  iteration:  60  parameters:  0.0401 0.2344 0.6546 106.9591 
chain:  1  iteration:  70  parameters:  0.0472 0.16 0.6886 122.3733 
chain:  1  iteration:  80  parameters:  0.0342 0.2067 0.6644 86.1813 
chain:  1  iteration:  90  parameters:  0.0275 0.283 0.66 137.1891 
chain:  1  iteration:  100  parameters:  0.0504 0.2691 0.5906 119.5155 
chain:  2  iteration:  10  parameters:  0.0375 0.2163 0.7045 72.9043 
chain:  2  iteration:  20  parameters:  0.0552 0.2582 0.6086 66.4738 
chain:  2  iteration:  30  parameters:  0.0552 0.2401 0.5912 62.2921 
chain:  2  iteration:  40  parameters:  0.0473 0.2028 0.6493 73.8324 
chain:  2  iteration:  50  parameters:  0.0501 0.2306 0.6155 90.2817 
chain:  2  iteration:  60  parameters:  0.0531 0.3456 0.5545 67.0353 
chain:  2  iteration:  70  parameters:  0.0576 0.2832 0.5626 70.8458 
chain:  2  iteration:  80  parameters:  0.0474 0.3112 0.5887 69.415 
chain:  2  iteration:  90  parameters:  0.0509 0.2573 0.5957 116.0901 
chain:  2  iteration:  100  parameters:  0.0384 0.2191 0.6504 72.6474 

n.chain:  2 
l.chain:  100 
l.bi:  50 
batch.size:  2 
smpl size:  50 

Iterations = 1:50
Thinning interval = 1 
Number of chains = 1 
Sample size per chain = 50 

1. Empirical mean and standard deviation for each variable,
   plus standard error of the mean:

           Mean        SD Naive SE Time-series SE
alpha0  0.04851  0.009319 0.001318       0.002593
alpha1  0.23908  0.042203 0.005968       0.009328
beta    0.62026  0.043774 0.006191       0.027919
nu     98.34994 22.751336 3.217525       7.330513

2. Quantiles for each variable:

           2.5%      25%       50%       75%    97.5%
alpha0  0.03333  0.04279   0.04832   0.05371   0.0711
alpha1  0.18593  0.20436   0.23496   0.26137   0.3269
beta    0.55992  0.58864   0.60994   0.66428   0.6928
nu     67.02528 78.25008 101.10804 114.20171 140.7397

bayesGARCH documentation built on May 17, 2021, 1:09 a.m.