Estimating Adaptive AutoRegressive-Moving-Average-and-mean model (includes mean term) 

 !! This function is obsolete and is replaced by AMARMA

 [z,E,REV,ESU,V,Z,SPUR] = aarmam(y, mode, MOP, UC, z0, Z0, V0, W); 
 Estimates AAR parameters with Kalman filter algorithm
 	y(t) = sum_i(a_i(t)*y(t-i)) + m(t) + e(t) + sum_i(b_i(t)*e(t-i))

 State space model
	z(t) = G*z(t-1) + w(t)    w(t)=N(0,W) 
	y(t) = H*z(t)   + v(t)	  v(t)=N(0,V)	

 G = I, 
 z = [m(t),a_1(t-1),..,a_p(t-p),b_1(t-1),...,b_q(t-q)];
 H = [1,y(t-1),..,y(t-p),e(t-1),...,e(t-q)];
 W = E{(z(t)-G*z(t-1))*(z(t)-G*z(t-1))'}
 V = E{(y(t)-H*z(t-1))*(y(t)-H*z(t-1))'}


 Input:
       y	Signal (AR-Process)
       Mode	determines the type of algorithm

       MOP     Model order [m,p,q], default [0,10,0]
			m=1 includes the mean term, m=0 does not. 
			p and q must be positive integers
			it is recommended to set q=0. 
	UC	Update Coefficient, default 0
	z0	Initial state vector
	Z0	Initial Covariance matrix
      
 Output:
	z	AR-Parameter
	E	error process (Adaptively filtered process)
       REV     relative error variance MSE/MSY

 REFERENCE(S): 
 [1] A. Schloegl (2000), The electroencephalogram and the adaptive autoregressive model: theory and applications. 
     ISBN 3-8265-7640-3 Shaker Verlag, Aachen, Germany. 

 More references can be found at 
     http://pub.ist.ac.at/~schloegl/publications/

Package: tsa