TAR.thres {BAYSTAR} | R Documentation |
To draw a threshold value.
Description
The prior for the threshold parameter thres
, follows a uniform prior on a range (l,u), where l and u can be set as relevant percentiles of the observed threshold variable. This prior could be considered to correspond to an empirical Bayes approach, rather than a fully Bayesian one. The posterior distribution of thres
is not of a standard distributional form, thus requiring us to use the Metropolis-Hastings (MH) method to achieve the desired sample for thres
.
Usage
TAR.thres(ay, p1, p2, ph.1, ph.2, sig.1, sig.2, lagd, thres,
step.r = 0.02, bound, lagp1, lagp2, constant = 1, thresVar)
Arguments
A list containing:
ay |
The real data set. (input) |
p1 |
Number of AR coefficients in regime one. |
p2 |
Number of AR coefficients in regime two. |
ph.1 |
The vector of AR parameters in regime one. |
ph.2 |
The vector of AR parameters in regime two. |
sig.1 |
The error terms of AR model in the regime one. |
sig.2 |
The error terms of AR model in the regime two. |
lagd |
The delay lag parameter. |
thres |
The threshold parameter. |
step.r |
Step size of threshold variable for the MH algorithm are controlled the proposal variance. |
bound |
The bound of threshold parameter. |
lagp1 |
The vector of non-zero autoregressive lags for the lower regime. (regime one); e.g. An AR model with p1=3, it could be non-zero lags 1,3, and 5 would set lagp1<-c(1,3,5). |
lagp2 |
The vector of non-zero autoregressive lags for the upper regime. (regime two) |
constant |
Use the CONSTANT option to fit a model with/without a constant term (1/0). By default CONSTANT=1. |
thresVar |
Exogenous threshold variable. (if missing, the series x is used) |
Author(s)
Cathy W.S. Chen, F.C. Liu