class_docstr: Class wrapper for Zivot-Andrews structural-break unit-root test
class_docstr_tok: ["Class","wrapper","for","Zivot-Andrews","structural-break","unit-root","test"]
docstr: Create the endog/exog data for the auxiliary regressions
  from the original (standardized) series under test.
docstr_tok: ["Create","the","endog\/exog","data","for","the","auxiliary","regressions","from","the","original","(","standardized",")","series","under","test","."]
code: def _format_regression_data(
      self, series, nobs, const, trend, cols, lags
  ):
      """
      Create the endog/exog data for the auxiliary regressions
      from the original (standardized) series under test.
      """
      # first-diff y and standardize for numerical stability
      endog = np.diff(series, axis=0)
      endog /= np.sqrt(endog.T.dot(endog))
      series /= np.sqrt(series.T.dot(series))
      # reserve exog space
      exog = np.zeros((endog[lags:].shape[0], cols + lags))
      exog[:, 0] = const
      # lagged y and dy
      exog[:, cols - 1] = series[lags : (nobs - 1)]
      exog[:, cols:] = lagmat(endog, lags, trim="none")[
          lags : exog.shape[0] + lags
      ]
      return endog, exog
  
imports: from __future__ import annotations
  from statsmodels.compat.numpy import lstsq
  from statsmodels.compat.pandas import deprecate_kwarg
  from statsmodels.compat.python import Literal, lzip
  from statsmodels.compat.scipy import _next_regular
  from typing import Union
  import warnings
  import numpy
  from numpy.linalg import LinAlgError
  import pandas
  from scipy import stats
  from scipy.interpolate import interp1d
  from scipy.signal import correlate
  from statsmodels.regression.linear_model import OLS, yule_walker
  from statsmodels.tools.sm_exceptions import CollinearityWarning, InfeasibleTestError, InterpolationWarning, MissingDataError, ValueWarning
  from statsmodels.tools.tools import Bunch, add_constant
  from statsmodels.tools.validation import array_like, bool_like, dict_like, float_like, int_like, string_like
  from statsmodels.tsa._bds import bds
  from statsmodels.tsa._innovations import innovations_algo, innovations_filter
  from statsmodels.tsa.adfvalues import mackinnoncrit, mackinnonp
  from statsmodels.tsa.tsatools import add_trend, lagmat, lagmat2ds
label_desc: Use image node_id 4 for calling the ZivotAndrewsUnitRoot obj's underlying member method code with example usage: obj._format_regression_data(series, nobs, const, trend, cols, lags) and returns: endog,  exog