Library: | times |
See also: | genexpar genbil genarma genarch |
Quantlet: | gentar | |
Description: | generates a Threshold AR process |
Usage: | x=gentar(nr,thrlag,thr,phi,noise) | |
Input: | ||
nr | integer: number of threshold regions | |
thrlag | integer: threshold lag | |
thr | vector (length nr-1): threshold values that seperates the regions | |
phi | vector (length nr*p): AR coefficients in each region. first p values are for the first region, etc. | |
noise | vector (length n=sample size needed): noise vector | |
Output: | ||
x | generated TAR process |
library("times") randomize(0) x=gentar(2,1,0,0.5|-0.5,normal(300)) x[1:5]
Contents of _tmp [1,] -0.89391 [2,] -1.4547 [3,] 1.2229 [4,] -1.9166 [5,] -2.3925
Library: | times |
See also: | genexpar genbil genarma genarch |