class_docstr: Test for stationarity via the Augmented Dickey-Fuller Unit Root Test (ADF).
  
  Uses ``statsmodels.tsa.stattools.adfuller`` as a test for unit roots,
  and derives a boolean statement whether a series is stationary.
  
  Also returns test results for the unit root test as fitted parameters.
  
  Parameters
  ----------
  p_threshold : float, optional, default=0.05
      significance threshold to apply in testing for stationarity
  maxlag : int or None, optional, default=None
      Maximum lag which is included in test, default value of
      12*(nobs/100)^{1/4} is used when ``None``.
  regression : str, one of {"c","ct","ctt","n"}, optional, default="c"
      Constant and trend order to include in regression.
  
      * "c" : constant only (default).
      * "ct" : constant and trend.
      * "ctt" : constant, and linear and quadratic trend.
      * "n" : no constant, no trend.
  
  autolag : one of {"AIC", "BIC", "t-stat", None}, optional, default="AIC"
      Method to use when automatically determining the lag length among the
      values 0, 1, ..., maxlag.
  
      * 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.
      * If None, then the number of included lags is set to maxlag.
  
  Attributes
  ----------
  stationary_ : bool
      whether the series in ``fit`` is stationary according to the test
      more precisely, whether the null of the ADF test is rejected at ``p_threshold``
  test_statistic_ : float
      The ADF test statistic, of running ``adfuller`` on ``y`` in ``fit``
  pvalue_ : float : float
      MacKinnon's approximate p-value based on MacKinnon (1994, 2010),
      obtained when running `adfuller` on ``y`` in ``fit``
  usedlag_ : int
      The number of lags used in the test.
  
  Examples
  --------
  >>> from sktime.datasets import load_airline
  >>> from sktime.param_est.stationarity import StationarityADF
  >>>
  >>> X = load_airline()  # doctest: +SKIP
  >>> sty_est = StationarityADF()  # doctest: +SKIP
  >>> sty_est.fit(X)  # doctest: +SKIP
  StationarityADF(...)
  >>> sty_est.get_fitted_params()["stationary"]  # doctest: +SKIP
  False
class_docstr_tok: ["Test","for","stationarity","via","the","Augmented","Dickey-Fuller","Unit","Root","Test","(","ADF",")",".","Uses","``","statsmodels.tsa.stattools.adfuller","``","as","a","test","for","unit","roots",",","and","derives","a","boolean","statement","whether","a","series","is","stationary",".","Also","returns","test","results","for","the","unit","root","test","as","fitted","parameters",".","Parameters","--","--","--","--","--","p_threshold",":","float",",","optional",",","default=0.05","significance","threshold","to","apply","in","testing","for","stationarity","maxlag",":","int","or","None",",","optional",",","default=None","Maximum","lag","which","is","included","in","test",",","default","value","of","12","*","(","nobs\/100",")","^","{","1\/4","}","is","used","when","``","None","``",".","regression",":","str",",","one","of","{","``","c","''",",","''","ct","''",",","''","ctt","''",",","''","n","''","}",",","optional",",","default=","''","c","''","Constant","and","trend","order","to","include","in","regression",".","*","``","c","''",":","constant","only","(","default",")",".","*","``","ct","''",":","constant","and","trend",".","*","``","ctt","''",":","constant",",","and","linear","and","quadratic","trend",".","*","``","n","''",":","no","constant",",","no","trend",".","autolag",":","one","of","{","``","AIC","''",",","``","BIC","''",",","``","t-stat","''",",","None","}",",","optional",",","default=","''","AIC","''","Method","to","use","when","automatically","determining","the","lag","length","among","the","values","0",",","1",",","...",",","maxlag",".","*","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",".","*","If","None",",","then","the","number","of","included","lags","is","set","to","maxlag",".","Attributes","--","--","--","--","--","stationary_",":","bool","whether","the","series","in","``","fit","``","is","stationary","according","to","the","test","more","precisely",",","whether","the","null","of","the","ADF","test","is","rejected","at","``","p_threshold","``","test_statistic_",":","float","The","ADF","test","statistic",",","of","running","``","adfuller","``","on","``","y","``","in","``","fit","``","pvalue_",":","float",":","float","MacKinnon","'s","approximate","p-value","based","on","MacKinnon","(","1994",",","2010",")",",","obtained","when","running","`","adfuller","`","on","``","y","``","in","``","fit","``","usedlag_",":","int","The","number","of","lags","used","in","the","test",".","Examples","--","--","--","--",">",">",">","from","sktime.datasets","import","load_airline",">",">",">","from","sktime.param_est.stationarity","import","StationarityADF",">",">",">",">",">",">","X","=","load_airline","(",")","#","doctest",":","+SKIP",">",">",">","sty_est","=","StationarityADF","(",")","#","doctest",":","+SKIP",">",">",">","sty_est.fit","(","X",")","#","doctest",":","+SKIP","StationarityADF","(","...",")",">",">",">","sty_est.get_fitted_params","(",")","[","``","stationary","''","]","#","doctest",":","+SKIP","False"]
docstr: Fit estimator and estimate parameters.
  
  private _fit containing the core logic, called from fit
  
  Writes to self:
      Sets fitted model attributes ending in "_".
  
  Parameters
  ----------
  X : guaranteed to be of a type in self.get_tag("X_inner_mtype")
      Time series to which to fit the estimator.
  
  Returns
  -------
  self : reference to self
docstr_tok: ["Fit","estimator","and","estimate","parameters",".","private","_fit","containing","the","core","logic",",","called","from","fit","Writes","to","self",":","Sets","fitted","model","attributes","ending","in","``","_","''",".","Parameters","--","--","--","--","--","X",":","guaranteed","to","be","of","a","type","in","self.get_tag","(","``","X_inner_mtype","''",")","Time","series","to","which","to","fit","the","estimator",".","Returns","--","--","--","-","self",":","reference","to","self"]
code: def _fit(self, X):
      """Fit estimator and estimate parameters.
  
      private _fit containing the core logic, called from fit
  
      Writes to self:
          Sets fitted model attributes ending in "_".
  
      Parameters
      ----------
      X : guaranteed to be of a type in self.get_tag("X_inner_mtype")
          Time series to which to fit the estimator.
  
      Returns
      -------
      self : reference to self
      """
      from statsmodels.tsa.stattools import adfuller
  
      p_threshold = self.p_threshold
  
      res = adfuller(
          x=X,
          maxlag=self.maxlag,
          regression=self.regression,
          autolag=self.autolag,
      )
      self.test_statistic_ = res[0]
      self.pvalue_ = res[1]
      self.stationary_ = res[1] <= p_threshold
      self.used_lag_ = res[2]
  
      return self
  
file_path: sktime/sktime/param_est/stationarity/_statsmodels.py
imports: from sktime.param_est.base import BaseParamFitter
label_desc: Use image node_id 2 for calling the StationarityADF obj's underlying member method code with example usage: obj._fit(X) and returns: self