本文主要是介绍statsmodels.tsa.stattools.adfuller()结构及用法详解,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!
statsmodels
是一个Python模块,提供了大量统计模型的类和函数。主要功能有:
- regression: Generalized least squares (including weighted least squares and least squares with autoregressive errors), ordinary least squares.
- glm: Generalized linear models with support for all of the one-parameter exponential family distributions.
discrete choice models: Poisson, probit, logit, multinomial logit - rlm: Robust linear models with support for several M-estimators.
- tsa: Time series analysis models, including ARMA, AR, VAR
- nonparametric : (Univariate) kernel density estimators
- datasets: Datasets to be distributed and used for examples and in testing.
- PyDTA: Tools for reading Stata .dta files into numpy arrays.
- 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
-
x (array_like*,* 1d) 数据序列
-
maxlag (int) – Maximum lag which is included in test, default 12*(nobs/100)^{1/4}
-
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
-
autolag ′ A I C ′ , ′ B I C ′ , ′ t − s t a t ′ , N o n e {'AIC', 'BIC', 't-stat', None} ′AIC′,′BIC′,′t−stat′,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
-
store (bool) – If True, then a result instance is returned additionally to the adf statistic. Default is False
-
regresults (bool*,* optional) – If True, the full regression results are returned. Default is False
这篇关于statsmodels.tsa.stattools.adfuller()结构及用法详解的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!