Module Expr Str Import alias identifier ImportFrom alias ImportFrom alias ImportFrom alias alias FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam NameParam NameParam defaults NameLoad NameLoad Num NameLoad NameLoad NameLoad kwarg body Expr Str Assign TupleStore NameStore NameStore Call AttributeLoad NameLoad attr NameLoad If CompareIs NameLoad NameLoad body Assign NameStore Call AttributeLoad NameLoad attr Call NameLoad NameLoad Assign NameStore BinOpSub Call NameLoad NameLoad Num orelse Assign NameStore NameLoad Assign NameStore Call AttributeLoad NameLoad attr BinOpAdd NameLoad Num Assign NameStore NameLoad If CompareIs NameLoad NameLoad body Assign NameStore Call NameLoad NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad orelse Assign TupleStore NameStore NameStore Call NameLoad NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad If NameLoad body Expr Call AttributeLoad NameLoad attr NameLoad ListLoad Num NameLoad NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr Str Str Expr Call AttributeLoad NameLoad attr Str Num Expr Call AttributeLoad NameLoad attr Str Str Expr Call AttributeLoad NameLoad attr Num Expr Call AttributeLoad NameLoad attr NameLoad NameLoad NameLoad Expr Call AttributeLoad NameLoad attr Str If CompareIsNot NameLoad NameLoad body Expr Call AttributeLoad NameLoad attr NameLoad BinOpSub SubscriptLoad NameLoad ExtSlice Slice Index Num NameLoad BinOpSub SubscriptLoad NameLoad ExtSlice Slice Index Num NameLoad keyword Num Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam NameParam defaults NameLoad NameLoad Num Str NameLoad kwarg body Expr Str Assign TupleStore NameStore NameStore Call AttributeLoad NameLoad attr NameLoad If CompareIs NameLoad NameLoad body Assign NameStore Call AttributeLoad NameLoad attr Call NameLoad NameLoad Assign NameStore BinOpSub Call NameLoad NameLoad Num orelse Assign NameStore NameLoad Assign NameStore Call AttributeLoad NameLoad attr BinOpAdd NameLoad Num Assign NameStore NameLoad If CompareIs NameLoad NameLoad body Assign NameStore Call NameLoad NameLoad keyword NameLoad keyword NameLoad keyword NameLoad orelse Assign TupleStore NameStore NameStore Call NameLoad NameLoad keyword NameLoad keyword NameLoad keyword NameLoad If NameLoad body Expr Call AttributeLoad NameLoad attr NameLoad ListLoad Num NameLoad NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr Str Str Expr Call AttributeLoad NameLoad attr Str Num Expr Call AttributeLoad NameLoad attr Str Str Expr Call AttributeLoad NameLoad attr Num Expr Call AttributeLoad NameLoad attr NameLoad NameLoad NameLoad Expr Call AttributeLoad NameLoad attr Str If CompareIsNot NameLoad NameLoad body Expr Call AttributeLoad NameLoad attr NameLoad BinOpSub SubscriptLoad NameLoad ExtSlice Slice Index Num NameLoad BinOpSub SubscriptLoad NameLoad ExtSlice Slice Index Num NameLoad keyword Num Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults NameLoad NameLoad body Expr Str Assign TupleStore NameStore NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore Num Assign NameStore ListLoad For TupleStore NameStore NameStore NameLoad body Assign NameStore Call AttributeLoad NameLoad attr Expr Call NameLoad NameLoad keyword NameLoad Assign NameStore Call NameLoad NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad BinOpAdd NameLoad NameLoad Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr NameLoad AttributeLoad NameLoad attr Str Expr Call AttributeLoad NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr SubscriptLoad NameLoad Index Num SubscriptLoad NameLoad Index Num keyword Str AugAssignAdd NameStore NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr Num Num Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults NameLoad NameLoad NameLoad body Expr Str ImportFrom alias If CompareIs NameLoad NameLoad body ImportFrom alias Expr Call NameLoad NameLoad keyword Str orelse ImportFrom alias alias Assign NameStore Call NameLoad NameLoad keyword Call NameLoad NameLoad keyword Str Assign NameStore ListLoad Str Str Str Str Str Str Str Str Str Str Str Str Return Call NameLoad Call AttributeLoad NameLoad attr Lambda arguments args NameParam defaults AttributeLoad NameLoad attr NameLoad keyword NameLoad keyword NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults NameLoad NameLoad NameLoad body Expr Str ImportFrom alias If CompareIs NameLoad NameLoad body ImportFrom alias Expr Call NameLoad NameLoad keyword Str orelse ImportFrom alias alias Assign NameStore Call NameLoad NameLoad keyword Call NameLoad NameLoad keyword Str Assign NameStore ListLoad Str Str Str Str Return Call NameLoad Call AttributeLoad NameLoad attr Lambda arguments args NameParam defaults AttributeLoad NameLoad attr NameLoad keyword NameLoad keyword NameLoad decorator_list If CompareEq NameLoad Str body Import alias identifier Assign NameStore Call AttributeLoad NameLoad attr Str keyword Num keyword NameLoad Expr Call NameLoad AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Num keyword Call AttributeLoad NameLoad attr keyword Str keyword Num keyword Str Expr Call NameLoad NameLoad
N/A N/A Correlation plot functions. N/A numpy np statsmodels.compat.pandas sort_values statsmodels.graphics utils statsmodels.tsa.stattools acf pacf plot_acf N/A N/A x ax lags alpha use_vlines unbiased fft N/A None None 0.05 True False False kwargs N/A N/A Plot the autocorrelation function

    Plots lags on the horizontal and the correlations on vertical axis.

    Parameters
    ----------
    x : array_like
        Array of time-series values
    ax : Matplotlib AxesSubplot instance, optional
        If given, this subplot is used to plot in instead of a new figure being
        created.
    lags : array_like, optional
        Array of lag values, used on horizontal axis.
        If not given, ``lags=np.arange(len(corr))`` is used.
    alpha : scalar, optional
        If a number is given, the confidence intervals for the given level are
        returned. For instance if alpha=.05, 95 % confidence intervals are
        returned where the standard deviation is computed according to
        Bartlett's formula. If None, no confidence intervals are plotted.
    use_vlines : bool, optional
        If True, vertical lines and markers are plotted.
        If False, only markers are plotted.  The default marker is 'o'; it can
        be overridden with a ``marker`` kwarg.
    unbiased : bool
       If True, then denominators for autocovariance are n-k, otherwise n
    fft : bool, optional
        If True, computes the ACF via FFT.
    **kwargs : kwargs, optional
        Optional keyword arguments that are directly passed on to the
        Matplotlib ``plot`` and ``axhline`` functions.

    Returns
    -------
    fig : Matplotlib figure instance
        If `ax` is None, the created figure.  Otherwise the figure to which
        `ax` is connected.

    See Also
    --------
    matplotlib.pyplot.xcorr
    matplotlib.pyplot.acorr
    mpl_examples/pylab_examples/xcorr_demo.py

    Notes
    -----
    Adapted from matplotlib's `xcorr`.

    Data are plotted as ``plot(lags, corr, **kwargs)``

     N/A N/A fig ax N/A N/A utils create_mpl_ax ax N/A N/A lags None N/A N/A lags N/A N/A np arange N/A len x N/A nlags N/A N/A len lags 1 N/A N/A nlags lags N/A lags N/A N/A np arange N/A lags 1 N/A confint None N/A N/A alpha None N/A N/A acf_x N/A acf x nlags nlags alpha alpha fft fft unbiased unbiased N/A N/A N/A acf_x confint N/A acf x nlags nlags alpha alpha fft fft unbiased unbiased N/A use_vlines N/A N/A N/A N/A ax vlines lags N/A 0 acf_x kwargs N/A N/A N/A ax axhline kwargs N/A N/A N/A kwargs setdefault marker o N/A N/A N/A kwargs setdefault markersize 5 N/A N/A N/A kwargs setdefault linestyle None N/A N/A N/A ax margins 0.05 N/A N/A N/A ax plot lags acf_x kwargs N/A N/A N/A ax set_title Autocorrelation N/A N/A confint None N/A N/A N/A N/A ax fill_between lags N/A N/A confint N/A N/A N/A 0 acf_x N/A N/A confint N/A N/A N/A 1 acf_x alpha 0.25 N/A fig N/A plot_pacf N/A N/A x ax lags alpha method use_vlines N/A None None 0.05 ywm True kwargs N/A N/A Plot the partial autocorrelation function

    Plots lags on the horizontal and the correlations on vertical axis.

    Parameters
    ----------
    x : array_like
        Array of time-series values
    ax : Matplotlib AxesSubplot instance, optional
        If given, this subplot is used to plot in instead of a new figure being
        created.
    lags : array_like, optional
        Array of lag values, used on horizontal axis.
        If not given, ``lags=np.arange(len(corr))`` is used.
    alpha : scalar, optional
        If a number is given, the confidence intervals for the given level are
        returned. For instance if alpha=.05, 95 % confidence intervals are
        returned where the standard deviation is computed according to
        1/sqrt(len(x))
    method : 'ywunbiased' (default) or 'ywmle' or 'ols'
        specifies which method for the calculations to use:

        - yw or ywunbiased : yule walker with bias correction in denominator
          for acovf
        - ywm or ywmle : yule walker without bias correction
        - ols - regression of time series on lags of it and on constant
        - ld or ldunbiased : Levinson-Durbin recursion with bias correction
        - ldb or ldbiased : Levinson-Durbin recursion without bias correction

    use_vlines : bool, optional
        If True, vertical lines and markers are plotted.
        If False, only markers are plotted.  The default marker is 'o'; it can
        be overridden with a ``marker`` kwarg.
    **kwargs : kwargs, optional
        Optional keyword arguments that are directly passed on to the
        Matplotlib ``plot`` and ``axhline`` functions.

    Returns
    -------
    fig : Matplotlib figure instance
        If `ax` is None, the created figure.  Otherwise the figure to which
        `ax` is connected.

    See Also
    --------
    matplotlib.pyplot.xcorr
    matplotlib.pyplot.acorr
    mpl_examples/pylab_examples/xcorr_demo.py

    Notes
    -----
    Adapted from matplotlib's `xcorr`.

    Data are plotted as ``plot(lags, corr, **kwargs)``

     N/A N/A fig ax N/A N/A utils create_mpl_ax ax N/A N/A lags None N/A N/A lags N/A N/A np arange N/A len x N/A nlags N/A N/A len lags 1 N/A N/A nlags lags N/A lags N/A N/A np arange N/A lags 1 N/A confint None N/A N/A alpha None N/A N/A acf_x N/A pacf x nlags nlags alpha alpha method method N/A N/A N/A acf_x confint N/A pacf x nlags nlags alpha alpha method method N/A use_vlines N/A N/A N/A N/A ax vlines lags N/A 0 acf_x kwargs N/A N/A N/A ax axhline kwargs N/A N/A N/A kwargs setdefault marker o N/A N/A N/A kwargs setdefault markersize 5 N/A N/A N/A kwargs setdefault linestyle None N/A N/A N/A ax margins 0.05 N/A N/A N/A ax plot lags acf_x kwargs N/A N/A N/A ax set_title Partial Autocorrelation N/A N/A confint None N/A N/A N/A N/A ax fill_between lags N/A N/A confint N/A N/A N/A 0 acf_x N/A N/A confint N/A N/A N/A 1 acf_x alpha 0.25 N/A fig N/A seasonal_plot N/A N/A grouped_x xticklabels ylabel ax N/A None None N/A N/A 
    Consider using one of month_plot or quarter_plot unless you need
    irregular plotting.

    Parameters
    ----------
    grouped_x : iterable of DataFrames
        Should be a GroupBy object (or similar pair of group_names and groups
        as DataFrames) with a DatetimeIndex or PeriodIndex
     N/A N/A fig ax N/A N/A utils create_mpl_ax ax N/A start 0 N/A ticks N/A N/A N/A season df grouped_x N/A N/A df N/A N/A df copy N/A N/A sort_values df inplace True N/A nobs N/A len df N/A x_plot N/A N/A np arange start N/A start nobs N/A N/A N/A ticks append N/A N/A x_plot mean N/A N/A N/A ax plot x_plot N/A df values k N/A N/A N/A ax hlines N/A N/A N/A df values mean N/A x_plot N/A 0 N/A x_plot N/A -1 colors k N/A start nobs N/A N/A N/A ax set_xticks ticks N/A N/A N/A ax set_xticklabels xticklabels N/A N/A N/A ax set_ylabel ylabel N/A N/A N/A ax margins 0.1 0.05 N/A fig N/A month_plot N/A N/A x dates ylabel ax N/A None None None N/A N/A 
    Seasonal plot of monthly data

    Parameters
    ----------
    x : array-like
        Seasonal data to plot. If dates is None, x must be a pandas object
        with a PeriodIndex or DatetimeIndex with a monthly frequency.
    dates : array-like, optional
        If `x` is not a pandas object, then dates must be supplied.
    ylabel : str, optional
        The label for the y-axis. Will attempt to use the `name` attribute
        of the Series.
    ax : matplotlib.axes, optional
        Existing axes instance.

    Returns
    -------
    matplotlib.Figure

    Examples
    --------
    >>> import statsmodels.api as sm
    >>> import pandas as pd

    >>> dta = sm.datasets.elnino.load_pandas().data
    >>> dta['YEAR'] = dta.YEAR.astype(int).astype(str)
    >>> dta = dta.set_index('YEAR').T.unstack()
    >>> dates = map(lambda x : pd.datetools.parse_time_string('1 '+' '.join(x)),
    ...                                        dta.index.values)

    >>> dta.index = pd.DatetimeIndex(dates, freq='M')
    >>> fig = sm.graphics.tsa.month_plot(dta)

    .. plot:: plots/graphics_month_plot.py
     pandas DataFrame N/A N/A dates None N/A statsmodels.tools.data _check_period_index N/A N/A _check_period_index x freq M N/A pandas Series PeriodIndex N/A x N/A Series x index N/A PeriodIndex dates freq M N/A xticklabels N/A j f m a m j j a s o n d N/A N/A seasonal_plot N/A N/A x groupby N/A N/A N/A y N/A N/A y month xticklabels ylabel ylabel ax ax N/A quarter_plot N/A N/A x dates ylabel ax N/A None None None N/A N/A 
    Seasonal plot of quarterly data

    Parameters
    ----------
    x : array-like
        Seasonal data to plot. If dates is None, x must be a pandas object
        with a PeriodIndex or DatetimeIndex with a monthly frequency.
    dates : array-like, optional
        If `x` is not a pandas object, then dates must be supplied.
    ylabel : str, optional
        The label for the y-axis. Will attempt to use the `name` attribute
        of the Series.
    ax : matplotlib.axes, optional
        Existing axes instance.

    Returns
    -------
    matplotlib.Figure
     pandas DataFrame N/A N/A dates None N/A statsmodels.tools.data _check_period_index N/A N/A _check_period_index x freq Q N/A pandas Series PeriodIndex N/A x N/A Series x index N/A PeriodIndex dates freq Q N/A xticklabels N/A q1 q2 q3 q4 N/A N/A seasonal_plot N/A N/A x groupby N/A N/A N/A y N/A N/A y quarter xticklabels ylabel ylabel ax ax N/A N/A N/A __name__ __main__ N/A N/A pandas pd N/A co2 N/A N/A pd read_csv co2.csv index_col 0 parse_dates True N/A N/A month_plot N/A co2 co2 N/A x N/A N/A pd Series N/A N/A np arange 20 index N/A N/A pd PeriodIndex start 1/1/1990 periods 20 freq Q N/A N/A quarter_plot x