statsmodels.tsa.stattools.adfuller()结构及用法详解
发布日期:2021-05-07 14:30:47 浏览次数:15 分类:精选文章

本文共 1979 字,大约阅读时间需要 6 分钟。

是一个Python模块,提供了大量统计模型的类和函数。主要功能有:

  1. regression: Generalized least squares (including weighted least squares and least squares with autoregressive errors), ordinary least squares.
  2. glm: Generalized linear models with support for all of the one-parameter exponential family distributions.
    discrete choice models: Poisson, probit, logit, multinomial logit
  3. rlm: Robust linear models with support for several M-estimators.
  4. tsa: Time series analysis models, including ARMA, AR, VAR
  5. nonparametric : (Univariate) kernel density estimators
  6. datasets: Datasets to be distributed and used for examples and in testing.
  7. PyDTA: Tools for reading Stata .dta files into numpy arrays.
  8. stats: a wide range of statistical tests

  • statsmodels.tsa.stattools.adfuller()

statsmodels.tsa.stattools.adfuller(x, maxlag=None, regression='c', autolag='AIC', store=False, regresults=False)

迪基-福勒检验Augmented Dickey-Fuller(ADF) Test

  • 参数详解

  1. x (array_like*,* 1d) 数据序列

  2. maxlag (int) – Maximum lag which is included in test, default 12*(nobs/100)^{1/4}

  3. regression ′ c ′ , ′ c t ′ , ′ c t t ′ , ′ n c ′ {'c','ct','ctt','nc'} c,ct,ctt,nc

    Constant and trend order to include in regression

    • ’c’ : constant only (default)
    • ’ct’ : constant and trend
    • ’ctt’ : constant, and linear and quadratic trend
    • ’nc’ : no constant, no trend
  4. autolag ′ A I C ′ , ′ B I C ′ , ′ t − s t a t ′ , N o n e {'AIC', 'BIC', 't-stat', None} AIC,BIC,tstat,None

    • if None, then maxlag lags are used
    • if ‘AIC’ (default) or ‘BIC’, then the number of lags is chosen to minimize the corresponding information criterion
    • ’t-stat’ based choice of maxlag. Starts with maxlag and drops a lag until the t-statistic on the last lag length is significant using a 5%-sized test
  5. store (bool) – If True, then a result instance is returned additionally to the adf statistic. Default is False

  6. regresults (bool*,* optional) – If True, the full regression results are returned. Default is False

上一篇:时间序列分析与量化交易(2)||实用
下一篇:《协整理论与波动模型-金融时间序列分析及应用(第二版)》

发表评论

最新留言

第一次来,支持一个
[***.219.124.196]2025年03月22日 20时54分46秒