statsmodels.tsa.stattools.adfuller()结构及用法详解

本文介绍了Python的statsmodels模块,它提供大量统计模型的类和函数,涵盖回归、广义线性模型、离散选择模型等多种功能。还详细解读了statsmodels.tsa.stattools.adfuller()函数,包括迪基 - 福勒检验及各参数含义。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

statsmodels是一个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(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

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值