]> Creatis software - CreaPhase.git/blob - octave_packages/tsa-4.2.4/parcor.m
Add a useful package (from Source forge) for octave
[CreaPhase.git] / octave_packages / tsa-4.2.4 / parcor.m
1 function [PARCOR,ARP, PE] = parcor(AutoCov);
2 % estimates partial autocorrelation coefficients 
3 % Multiple channels can be used (one per row).
4 %
5 % [PARCOR, AR, PE] = parcor(AutoCov); % calculates Partial autocorrelation, autoregressive coefficients and residual error variance from the Autocorrelation function. 
6 %
7 % [PARCOR] = parcor(acovf(x,p)); % calculates the Partial Autocorrelation coefficients of the data series x up to order p
8 %
9 %  INPUT:
10 % AutoCov       Autocorrelation function for lag=0:P
11 %
12 %  OUTPUT
13 % AR    autoregressive model parameter  
14 % PARCOR partial correlation coefficients (= -reflection coefficients)
15 % PE    remaining error variance
16 %
17 % All input and output parameters are organized in rows, one row 
18 % corresponds to the parameters of one channel. 
19 % The PARCOR coefficients are the negative reflection coefficients. 
20 % A significance test is implemented in PACF.
21 %
22 % see also: PACF ACOVF ACORF DURLEV AC2RC 
23
24 % REFERENCES:
25 %  P.J. Brockwell and R.A. Davis "Time Series: Theory and Methods", 2nd ed. Springer, 1991.
26 %  S. Haykin "Adaptive Filter Theory" 3ed. Prentice Hall, 1996.
27 %  M.B. Priestley "Spectral Analysis and Time Series" Academic Press, 1981. 
28 %  W.S. Wei "Time Series Analysis" Addison Wesley, 1990.
29
30
31 %       $Id: parcor.m 5090 2008-06-05 08:12:04Z schloegl $
32 %       Copyright (C) 1997-2002,2008 by Alois Schloegl <a.schloegl@ieee.org>    
33 %
34 %    This program is free software: you can redistribute it and/or modify
35 %    it under the terms of the GNU General Public License as published by
36 %    the Free Software Foundation, either version 3 of the License, or
37 %    (at your option) any later version.
38 %
39 %    This program is distributed in the hope that it will be useful,
40 %    but WITHOUT ANY WARRANTY; without even the implied warranty of
41 %    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
42 %    GNU General Public License for more details.
43 %
44 %    You should have received a copy of the GNU General Public License
45 %    along with this program.  If not, see <http://www.gnu.org/licenses/>.
46
47
48 [ARP,PARCOR,PE] = durlev(AutoCov);
49 PARCOR=-PARCOR;