 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 
                         
--------------------------------------------------------------
(C) MD*TECH Method and Data Technologies, 17.8.2000
