Learn R Programming

dsp (version 1.2.0)

t_sampleAR1: Sample the TAR(1) coefficients

Description

Compute one draw of the TAR(1) coefficients in a model with Gaussian innovations and time-dependent innovation variances. In particular, we use the sampler for the log-volatility TAR(1) process with the parameter-expanded Polya-Gamma sampler. The sampler also applies to a multivariate case with independent components.

Usage

t_sampleAR1(h_yc, h_phi, h_phi2, h_sigma_eta_t, h_st, prior_dhs_phi = NULL)

Value

2 vector of sampled TAR(1) coefficient(s)

Arguments

h_yc

the T vector of centered log-volatilities (i.e., the log-vols minus the unconditional means dhs_mean)

h_phi

the 1 vector of previous AR(1) coefficient(s)

h_phi2

the 1 vector of previous penalty coefficient(s)

h_sigma_eta_t

the T vector of log-vol innovation standard deviations

h_st

the T vector of indicators on whether each time-step exceed the estimated threshold

prior_dhs_phi

the parameters of the prior for the log-volatility AR(1) coefficient dhs_phi; either NULL for uniform on [-1,1] or a 2-dimensional vector of (shape1, shape2) for a Beta prior on [(dhs_phi + 1)/2]