
    >h.	                     0    S r SSKrSSKJr   " S S5      rg)zvDescriptive Statistics for Time Series

Created on Sat Oct 30 14:24:08 2010

Author: josef-pktd
License: BSD(3clause)
    N   )	stattoolsc                   `    \ rS rSrSrSS jrS rSS jrSS jrSS jr	SS	 jr
S
 rSS jrSrg)TsaDescriptive   zCcollection of descriptive statistical methods for time series

    Nc                 (    Xl         X l        X0l        g N)datalabelname)selfr
   r   r   s       sC:\Users\julio\OneDrive\Documentos\Trabajo\Ideas Frescas\venv\Lib\site-packages\statsmodels/tsa/descriptivestats.py__init__TsaDescriptive.__init__   s    	
	    c                     SSK Jn  U" XU R                  5      nU R                  X@R                  U R
                  S-   5      $ )Nr   )lfilter	_filtered)scipy.signalr   r
   	__class__r   r   )r   numdenr   	xfiltereds        r   filterTsaDescriptive.filter   s3    (Cdii0	~~iTYY5LMMr   c                     SSK Jn  UR                  U R                  US9nU R	                  X0R
                  U R                  S-   5      $ )Nr   )tsatools)order
_detrended) r   detrendr
   r   r   r   )r   r   r   
xdetrendeds       r   r!   TsaDescriptive.detrend   s<    %%diiu%=
~~j**dii,6NOOr   c                     SSK Jn  U" U R                  5      U l        U R                  R                  " SSU0UD6U l        U R
                  $ )Nr   )ARMAr    )arima_modelr%   r
   modfitres)r   r   kwdsr%   s       r   r)   TsaDescriptive.fit"   s9    %		?88<<4e4t4xxr   c                 @    [         R                  " U R                  US9$ N)nlags)sttacfr
   r   r/   s     r   r1   TsaDescriptive.acf)   s    wwtyy..r   c                 @    [         R                  " U R                  US9$ r.   )r0   pacfr
   r2   s     r   r5   TsaDescriptive.pacf,   s    xx		//r   c                 B    [         R                  " U R                  5      $ r	   )r0   periodogramr
   )r   s    r   r8   TsaDescriptive.periodogram/   s    tyy))r   c                    U R                   nU R                  U5      nU R                  U5      n[        R                  " S[        R
                  USS9nU R                  5       S U n	Uc  SS KJn
  U
R                  5       nUR                  SSS5      nU R                  (       a  SU R                  -  OSnUR                  U5        UR                  SU-   5        UR                  SSS5      nUR                  U5        UR                  S	U-   5        UR                  SSS
5      nUR                  U	5        UR                  SU-   5        UR                  SSS5      nUR                  U5        UR                  SU-   5        U$ )Nr   F)endpoint   r   z for %sr    zTime seriesAutocorrelation   zPower Spectrum   zPartial Autocorrelation)r
   r1   r5   nplinspacepir8   matplotlib.pyplotpyplotfigureadd_subplotr   plot	set_title)r   fignobsnacfnfreqr
   r1   r5   wspdrpltaxnamestrs                r   plot4TsaDescriptive.plot44   s;   yyhhtnyyKK255%%8!&5);+**,C__Qq#+/99)dii'"

]W,-__Qq#

&01__Qq#

%/0__Qq#

.89
r   )r
   r   r(   r   r*   )Nr    )r   ))r   r   r   )(   )Nd      rU   )__name__
__module____qualname____firstlineno____doc__r   r   r!   r)   r1   r5   r8   rR   __static_attributes__r&   r   r   r   r      s1    
N
P
/0*
r   r   )r[   numpyr@   r    r   r0   r   r&   r   r   <module>r^      s     A Ar   