class_docstr: Autoregressive Distributed Lag (ARDL) Model.
  
  Direct interface for statsmodels.tsa.ardl.ARDL
  
  Parameters
  ----------
  lags : {int, list[int]}, optional
      Only considered if auto_ardl is False
      The number of lags to include in the model if an integer or the
      list of lag indices to include.  For example, [1, 4] will only
      include lags 1 and 4 while lags=4 will include lags 1, 2, 3, and 4.
  order : {int, sequence[int], dict}, optional
      Only considered if auto_ardl is False
      If int, uses lags 0, 1, ..., order  for all exog variables. If
      sequence[int], uses the ``order`` for all variables. If a dict,
      applies the lags series by series. If ``exog`` is anything other
      than a DataFrame, the keys are the column index of exog (e.g., 0,
      1, ...). If a DataFrame, keys are column names.
  fixed : array_like, optional
      Additional fixed regressors that are not lagged.
  causal : bool, optional
      Whether to include lag 0 of exog variables.  If True, only includes
      lags 1, 2, ...
  trend : {'n', 'c', 't', 'ct'}, optional
      The trend to include in the model:
  
      * 'n' - No trend.
      * 'c' - Constant only.
      * 't' - Time trend only.
      * 'ct' - Constant and time trend.
  
      The default is 'c'.
  
  seasonal : bool, optional
      Flag indicating whether to include seasonal dummies in the model. If
      seasonal is True and trend includes 'c', then the first period
      is excluded from the seasonal terms.
  deterministic : DeterministicProcess, optional
      A deterministic process.  If provided, trend and seasonal are ignored.
      A warning is raised if trend is not "n" and seasonal is not False.
  hold_back : {None, int}, optional
      Initial observations to exclude from the estimation sample.  If None,
      then hold_back is equal to the maximum lag in the model.  Set to a
      non-zero value to produce comparable models with different lag
      length.  For example, to compare the fit of a model with lags=3 and
      lags=1, set hold_back=3 which ensures that both models are estimated
      using observations 3,...,nobs. hold_back must be >= the maximum lag in
      the model.
  period : {None, int}, optional
      The period of the data. Only used if seasonal is True. This parameter
      can be omitted if using a pandas object for endog that contains a
      recognized frequency.
  missing : {"none", "drop", "raise"}, optional
      Available options are 'none', 'drop', and 'raise'. If 'none', no nan
      checking is done. If 'drop', any observations with nans are dropped.
      If 'raise', an error is raised. Default is 'none'.
  cov_type : str, optional
      The covariance estimator to use. The most common choices are listed
      below.  Supports all covariance estimators that are available
      in ``OLS.fit``.
  
      * 'nonrobust' - The class OLS covariance estimator that assumes
        homoskedasticity.
      * 'HC0', 'HC1', 'HC2', 'HC3' - Variants of White's
        (or Eiker-Huber-White) covariance estimator. `HC0` is the
        standard implementation.  The other make corrections to improve
        the finite sample performance of the heteroskedasticity robust
        covariance estimator.
      * 'HAC' - Heteroskedasticity-autocorrelation robust covariance
        estimation. Supports cov_kwds.
  
        - `maxlags` integer (required) : number of lags to use.
        - `kernel` callable or str (optional) : kernel
            currently available kernels are ['bartlett', 'uniform'],
            default is Bartlett.
        - `use_correction` bool (optional) : If true, use small sample
            correction.
  cov_kwds : dict, optional
      A dictionary of keyword arguments to pass to the covariance
      estimator. `nonrobust` and `HC#` do not support cov_kwds.
  use_t : bool, optional
      A flag indicating that inference should use the Student's t
      distribution that accounts for model degree of freedom.  If False,
      uses the normal distribution. If None, defers the choice to
      the cov_type. It also removes degree of freedom corrections from
      the covariance estimator when cov_type is 'nonrobust'.
  auto_ardl : bool, optional
      A flag indicating whether the number of lags should be determined automatically.
  maxlag : int, optional
      Only considered if auto_ardl is True.
      The maximum lag to consider for the endogenous variable.
  maxorder : {int, dict}
      Only considered if auto_ardl is True.
      If int, sets a common max lag length for all exog variables. If
      a dict, then sets individual lag length. They keys are column names
      if exog is a DataFrame or column indices otherwise.
  ic : {"aic", "bic", "hqic"}, optional
      Only considered if auto_ardl is True.
      The information criterion to use in model selection.
  glob : bool, optional
      Only considered if auto_ardl is True.
      Whether to consider all possible submodels of the largest model
      or only if smaller order lags must be included if larger order
      lags are.  If ``True``, the number of model considered is of the
      order 2**(maxlag + k * maxorder) assuming maxorder is an int. This
      can be very large unless k and maxorder are bot relatively small.
      If False, the number of model considered is of the order
      maxlag*maxorder**k which may also be substantial when k and maxorder
      are large.
  X_oos : array_like, optional
      An array containing out-of-sample values of the exogenous
      variables. Must have the same number of columns as the X
      and at least as many rows as the number of out-of-sample forecasts.
  fixed_oos : array_like, optional
      An array containing out-of-sample values of the fixed variables.
      Must have the same number of columns as the fixed array
      and at least as many rows as the number of out-of-sample forecasts.
  dynamic : {bool, int, str, datetime, Timestamp}, optional
      Integer offset relative to `start` at which to begin dynamic
      prediction. Prior to this observation, true endogenous values
      will be used for prediction; starting with this observation and
      continuing through the end of prediction, forecasted endogenous
      values will be used instead. Datetime-like objects are not
      interpreted as offsets. They are instead used to find the index
      location of `dynamic` which is then used to to compute the offset.
  
  Notes
  -----
  The full specification of an ARDL is
  
  .. math ::
  
     Y_t = delta_0 + delta_1 t + delta_2 t^2
           + sum_{i=1}^{s-1} gamma_i I_{[(mod(t,s) + 1) = i]}
           + sum_{j=1}^p phi_j Y_{t-j}
           + sum_{l=1}^k sum_{m=0}^{o_l} beta_{l,m} X_{l, t-m}
           + Z_t lambda
           + epsilon_t
  
  where :math:`delta_bullet` capture trends, :math:`gamma_bullet`
  capture seasonal shifts, s is the period of the seasonality, p is the
  lag length of the endogenous variable, k is the number of exogenous
  variables :math:`X_{l}`, :math:`o_l` is included the lag length of
  :math:`X_{l}`, :math:`Z_t` are ``r`` included fixed regressors and
  :math:`epsilon_t` is a white noise shock. If ``causal`` is ``True``,
  then the 0-th lag of the exogenous variables is not included and the
  sum starts at ``m=1``.
  
  See Also
  --------
  statsmodels.tsa.ar_model.AutoReg
      Autoregressive model estimation with optional exogenous regressors
  statsmodels.tsa.ardl.UECM
      Unconstrained Error Correction Model estimation
  statsmodels.tsa.statespace.sarimax.SARIMAX
      Seasonal ARIMA model estimation with optional exogenous regressors
  statsmodels.tsa.arima.model.ARIMA
      ARIMA model estimation
  
  Examples
  --------
  Use ARDL on macroeconomic data
  >>> from sktime.datasets import load_macroeconomic
  >>> from sktime.forecasting.ardl import ARDL
  >>> from sktime.forecasting.base import ForecastingHorizon
  >>> data = load_macroeconomic()  # doctest: +SKIP
  >>> oos = data.iloc[-5:, :]  # doctest: +SKIP
  >>> data = data.iloc[:-5, :]  # doctest: +SKIP
  >>> y = data.realgdp  # doctest: +SKIP
  >>> X = data[["realcons", "realinv"]]  # doctest: +SKIP
  >>> X_oos = oos[["realcons", "realinv"]]  # doctest: +SKIP
  >>> ardl = ARDL(lags=2, order={"realcons": 1, "realinv": 2}, trend="c")    # doctest: +SKIP
  >>> ardl.fit(y=y, X=X)  # doctest: +SKIP
  ARDL(lags=2, order={'realcons': 1, 'realinv': 2})
  >>> fh = ForecastingHorizon([1, 2, 3])  # doctest: +SKIP
  >>> y_pred = ardl.predict(fh=fh, X=X_oos)  # doctest: +SKIP
class_docstr_tok: ["Autoregressive","Distributed","Lag","(","ARDL",")","Model",".","Direct","interface","for","statsmodels.tsa.ardl.ARDL","Parameters","--","--","--","--","--","lags",":","{","int",",","list","[","int","]","}",",","optional","Only","considered","if","auto_ardl","is","False","The","number","of","lags","to","include","in","the","model","if","an","integer","or","the","list","of","lag","indices","to","include",".","For","example",",","[","1",",","4","]","will","only","include","lags","1","and","4","while","lags=4","will","include","lags","1",",","2",",","3",",","and","4.","order",":","{","int",",","sequence","[","int","]",",","dict","}",",","optional","Only","considered","if","auto_ardl","is","False","If","int",",","uses","lags","0",",","1",",","...",",","order","for","all","exog","variables",".","If","sequence","[","int","]",",","uses","the","``","order","``","for","all","variables",".","If","a","dict",",","applies","the","lags","series","by","series",".","If","``","exog","``","is","anything","other","than","a","DataFrame",",","the","keys","are","the","column","index","of","exog","(","e.g.",",","0",",","1",",","...",")",".","If","a","DataFrame",",","keys","are","column","names",".","fixed",":","array_like",",","optional","Additional","fixed","regressors","that","are","not","lagged",".","causal",":","bool",",","optional","Whether","to","include","lag","0","of","exog","variables",".","If","True",",","only","includes","lags","1",",","2",",","...","trend",":","{","'n","'",",","'","c","'",",","'t","'",",","'ct","'","}",",","optional","The","trend","to","include","in","the","model",":","*","'n","'","-","No","trend",".","*","'","c","'","-","Constant","only",".","*","'t","'","-","Time","trend","only",".","*","'ct","'","-","Constant","and","time","trend",".","The","default","is","'","c","'",".","seasonal",":","bool",",","optional","Flag","indicating","whether","to","include","seasonal","dummies","in","the","model",".","If","seasonal","is","True","and","trend","includes","'","c","'",",","then","the","first","period","is","excluded","from","the","seasonal","terms",".","deterministic",":","DeterministicProcess",",","optional","A","deterministic","process",".","If","provided",",","trend","and","seasonal","are","ignored",".","A","warning","is","raised","if","trend","is","not","``","n","''","and","seasonal","is","not","False",".","hold_back",":","{","None",",","int","}",",","optional","Initial","observations","to","exclude","from","the","estimation","sample",".","If","None",",","then","hold_back","is","equal","to","the","maximum","lag","in","the","model",".","Set","to","a","non-zero","value","to","produce","comparable","models","with","different","lag","length",".","For","example",",","to","compare","the","fit","of","a","model","with","lags=3","and","lags=1",",","set","hold_back=3","which","ensures","that","both","models","are","estimated","using","observations","3",",","...",",","nobs",".","hold_back","must","be",">","=","the","maximum","lag","in","the","model",".","period",":","{","None",",","int","}",",","optional","The","period","of","the","data",".","Only","used","if","seasonal","is","True",".","This","parameter","can","be","omitted","if","using","a","pandas","object","for","endog","that","contains","a","recognized","frequency",".","missing",":","{","``","none","''",",","``","drop","''",",","``","raise","''","}",",","optional","Available","options","are","'none","'",",","'drop","'",",","and","'raise","'",".","If","'none","'",",","no","nan","checking","is","done",".","If","'drop","'",",","any","observations","with","nans","are","dropped",".","If","'raise","'",",","an","error","is","raised",".","Default","is","'none","'",".","cov_type",":","str",",","optional","The","covariance","estimator","to","use",".","The","most","common","choices","are","listed","below",".","Supports","all","covariance","estimators","that","are","available","in","``","OLS.fit","``",".","*","'nonrobust","'","-","The","class","OLS","covariance","estimator","that","assumes","homoskedasticity",".","*","'HC0","'",",","'HC1","'",",","'HC2","'",",","'HC3","'","-","Variants","of","White's","(","or","Eiker-Huber-White",")","covariance","estimator",".","`","HC0","`","is","the","standard","implementation",".","The","other","make","corrections","to","improve","the","finite","sample","performance","of","the","heteroskedasticity","robust","covariance","estimator",".","*","'HAC","'","-","Heteroskedasticity-autocorrelation","robust","covariance","estimation",".","Supports","cov_kwds",".","-","`","maxlags","`","integer","(","required",")",":","number","of","lags","to","use",".","-","`","kernel","`","callable","or","str","(","optional",")",":","kernel","currently","available","kernels","are","[","'bartlett","'",",","'uniform","'","]",",","default","is","Bartlett",".","-","`","use_correction","`","bool","(","optional",")",":","If","true",",","use","small","sample","correction",".","cov_kwds",":","dict",",","optional","A","dictionary","of","keyword","arguments","to","pass","to","the","covariance","estimator",".","`","nonrobust","`","and","`","HC","#","`","do","not","support","cov_kwds",".","use_t",":","bool",",","optional","A","flag","indicating","that","inference","should","use","the","Student","'s","t","distribution","that","accounts","for","model","degree","of","freedom",".","If","False",",","uses","the","normal","distribution",".","If","None",",","defers","the","choice","to","the","cov_type",".","It","also","removes","degree","of","freedom","corrections","from","the","covariance","estimator","when","cov_type","is","'nonrobust","'",".","auto_ardl",":","bool",",","optional","A","flag","indicating","whether","the","number","of","lags","should","be","determined","automatically",".","maxlag",":","int",",","optional","Only","considered","if","auto_ardl","is","True",".","The","maximum","lag","to","consider","for","the","endogenous","variable",".","maxorder",":","{","int",",","dict","}","Only","considered","if","auto_ardl","is","True",".","If","int",",","sets","a","common","max","lag","length","for","all","exog","variables",".","If","a","dict",",","then","sets","individual","lag","length",".","They","keys","are","column","names","if","exog","is","a","DataFrame","or","column","indices","otherwise",".","ic",":","{","``","aic","''",",","``","bic","''",",","``","hqic","''","}",",","optional","Only","considered","if","auto_ardl","is","True",".","The","information","criterion","to","use","in","model","selection",".","glob",":","bool",",","optional","Only","considered","if","auto_ardl","is","True",".","Whether","to","consider","all","possible","submodels","of","the","largest","model","or","only","if","smaller","order","lags","must","be","included","if","larger","order","lags","are",".","If","``","True","``",",","the","number","of","model","considered","is","of","the","order","2","*","*","(","maxlag","+","k","*","maxorder",")","assuming","maxorder","is","an","int",".","This","can","be","very","large","unless","k","and","maxorder","are","bot","relatively","small",".","If","False",",","the","number","of","model","considered","is","of","the","order","maxlag","*","maxorder","*","*","k","which","may","also","be","substantial","when","k","and","maxorder","are","large",".","X_oos",":","array_like",",","optional","An","array","containing","out-of-sample","values","of","the","exogenous","variables",".","Must","have","the","same","number","of","columns","as","the","X","and","at","least","as","many","rows","as","the","number","of","out-of-sample","forecasts",".","fixed_oos",":","array_like",",","optional","An","array","containing","out-of-sample","values","of","the","fixed","variables",".","Must","have","the","same","number","of","columns","as","the","fixed","array","and","at","least","as","many","rows","as","the","number","of","out-of-sample","forecasts",".","dynamic",":","{","bool",",","int",",","str",",","datetime",",","Timestamp","}",",","optional","Integer","offset","relative","to","`","start","`","at","which","to","begin","dynamic","prediction",".","Prior","to","this","observation",",","true","endogenous","values","will","be","used","for","prediction",";","starting","with","this","observation","and","continuing","through","the","end","of","prediction",",","forecasted","endogenous","values","will","be","used","instead",".","Datetime-like","objects","are","not","interpreted","as","offsets",".","They","are","instead","used","to","find","the","index","location","of","`","dynamic","`","which","is","then","used","to","to","compute","the","offset",".","Notes","--","--","-","The","full","specification","of","an","ARDL","is","..","math",":",":","Y_t","=","delta_0","+","delta_1","t","+","delta_2","t^2","+","sum_","{","i=1","}","^","{","s-1","}","gamma_i","I_","{","[","(","mod","(","t",",","s",")","+","1",")","=","i","]","}","+","sum_","{","j=1","}","^p","phi_j","Y_","{","t-j","}","+","sum_","{","l=1","}","^k","sum_","{","m=0","}","^","{","o_l","}","beta_","{","l",",","m","}","X_","{","l",",","t-m","}","+","Z_t","lambda","+","epsilon_t","where",":","math",":","`","delta_bullet","`","capture","trends",",",":","math",":","`","gamma_bullet","`","capture","seasonal","shifts",",","s","is","the","period","of","the","seasonality",",","p","is","the","lag","length","of","the","endogenous","variable",",","k","is","the","number","of","exogenous","variables",":","math",":","`","X_","{","l","}","`",",",":","math",":","`","o_l","`","is","included","the","lag","length","of",":","math",":","`","X_","{","l","}","`",",",":","math",":","`","Z_t","`","are","``","r","``","included","fixed","regressors","and",":","math",":","`","epsilon_t","`","is","a","white","noise","shock",".","If","``","causal","``","is","``","True","``",",","then","the","0-th","lag","of","the","exogenous","variables","is","not","included","and","the","sum","starts","at","``","m=1","``",".","See","Also","--","--","--","--","statsmodels.tsa.ar_model.AutoReg","Autoregressive","model","estimation","with","optional","exogenous","regressors","statsmodels.tsa.ardl.UECM","Unconstrained","Error","Correction","Model","estimation","statsmodels.tsa.statespace.sarimax.SARIMAX","Seasonal","ARIMA","model","estimation","with","optional","exogenous","regressors","statsmodels.tsa.arima.model.ARIMA","ARIMA","model","estimation","Examples","--","--","--","--","Use","ARDL","on","macroeconomic","data",">",">",">","from","sktime.datasets","import","load_macroeconomic",">",">",">","from","sktime.forecasting.ardl","import","ARDL",">",">",">","from","sktime.forecasting.base","import","ForecastingHorizon",">",">",">","data","=","load_macroeconomic","(",")","#","doctest",":","+SKIP",">",">",">","oos","=","data.iloc","[","-5",":",",",":","]","#","doctest",":","+SKIP",">",">",">","data","=","data.iloc","[",":","-5",",",":","]","#","doctest",":","+SKIP",">",">",">","y","=","data.realgdp","#","doctest",":","+SKIP",">",">",">","X","=","data","[","[","``","realcons","''",",","``","realinv","''","]","]","#","doctest",":","+SKIP",">",">",">","X_oos","=","oos","[","[","``","realcons","''",",","``","realinv","''","]","]","#","doctest",":","+SKIP",">",">",">","ardl","=","ARDL","(","lags=2",",","order=","{","``","realcons","''",":","1",",","``","realinv","''",":","2","}",",","trend=","''","c","''",")","#","doctest",":","+SKIP",">",">",">","ardl.fit","(","y=y",",","X=X",")","#","doctest",":","+SKIP","ARDL","(","lags=2",",","order=","{","'realcons","'",":","1",",","'realinv","'",":","2","}",")",">",">",">","fh","=","ForecastingHorizon","(","[","1",",","2",",","3","]",")","#","doctest",":","+SKIP",">",">",">","y_pred","=","ardl.predict","(","fh=fh",",","X=X_oos",")","#","doctest",":","+SKIP"]
docstr: Return testing parameter settings for the estimator.
  
  Parameters
  ----------
  parameter_set : str, default="default"
      Name of the set of test parameters to return, for use in tests. If no
      special parameters are defined for a value, will return `"default"` set.
      There are currently no reserved values for forecasters.
  
  Returns
  -------
  params : dict or list of dict, default = {}
      Parameters to create testing instances of the class
      Each dict are parameters to construct an "interesting" test instance, i.e.,
      `MyClass(**params)` or `MyClass(**params[i])` creates a valid test instance.
      `create_test_instance` uses the first (or only) dictionary in `params`
docstr_tok: ["Return","testing","parameter","settings","for","the","estimator",".","Parameters","--","--","--","--","--","parameter_set",":","str",",","default=","''","default","''","Name","of","the","set","of","test","parameters","to","return",",","for","use","in","tests",".","If","no","special","parameters","are","defined","for","a","value",",","will","return","`","``","default","''","`","set",".","There","are","currently","no","reserved","values","for","forecasters",".","Returns","--","--","--","-","params",":","dict","or","list","of","dict",",","default","=","{","}","Parameters","to","create","testing","instances","of","the","class","Each","dict","are","parameters","to","construct","an","``","interesting","''","test","instance",",","i.e.",",","`","MyClass","(","*","*","params",")","`","or","`","MyClass","(","*","*","params","[","i","]",")","`","creates","a","valid","test","instance",".","`","create_test_instance","`","uses","the","first","(","or","only",")","dictionary","in","`","params","`"]
code: def get_test_params(cls, parameter_set="default"):
      """Return testing parameter settings for the estimator.
  
      Parameters
      ----------
      parameter_set : str, default="default"
          Name of the set of test parameters to return, for use in tests. If no
          special parameters are defined for a value, will return `"default"` set.
          There are currently no reserved values for forecasters.
  
      Returns
      -------
      params : dict or list of dict, default = {}
          Parameters to create testing instances of the class
          Each dict are parameters to construct an "interesting" test instance, i.e.,
          `MyClass(**params)` or `MyClass(**params[i])` creates a valid test instance.
          `create_test_instance` uses the first (or only) dictionary in `params`
      """
      params = [
          {"lags": 1, "trend": "c", "order": 2},
          {"lags": 1, "trend": "ct"},
          {"auto_ardl": True, "maxlag": 2, "maxorder": 2},
      ]
      return params
  
file_path: sktime/sktime/forecasting/ardl.py
imports: import warnings
  import pandas
  from sktime.forecasting.base._base import BaseForecaster
  from sktime.forecasting.base.adapters import _StatsModelsAdapter
  from sktime.forecasting.base.adapters._statsmodels import _coerce_int_to_range_index
label_desc: Use image node_id 8 for calling the ARDL obj's underlying member method code with example usage: obj.get_test_params(cls, parameter_set) and returns: params