powered by
Generate univariate SETAR model for up to 3 regimes.
uTAR.sim( nob, arorder, phi, d = 1, thr = c(0, 0), sigma = c(1, 1, 1), cnst = rep(0, 3), ini = 500 )
uTAR.sim returns a list with components:
a time series following SETAR model.
innovation of the time seres.
AR-order for each regime.
threshold value.
a 3-by-p matrix. Each row contains the AR coefficients for a regime.
constant terms
standard error for each regime.
number of observations.
AR-order for each regime. The length of arorder controls the number of regimes.
delay for threshold variable.
threshold values.
constant terms.
burn-in period.
arorder=rep(1,2) ar.coef=matrix(c(0.7,-0.8),2,1) y=uTAR.sim(100,arorder,ar.coef,1,0)
Run the code above in your browser using DataLab