class_docstr: Provides the base class for stationarity tests such as the
  Kwiatkowski–Phillips–Schmidt–Shin, Augmented Dickey-Fuller and the
  Phillips–Perron tests. These tests are used to determine whether a time
  series is stationary.
class_docstr_tok: ["Provides","the","base","class","for","stationarity","tests","such","as","the","Kwiatkowski\u2013Phillips\u2013Schmidt\u2013Shin",",","Augmented","Dickey-Fuller","and","the","Phillips\u2013Perron","tests",".","These","tests","are","used","to","determine","whether","a","time","series","is","stationary","."]
docstr: Test whether the time series is stationary or it needs differencing.
  
  Parameters
  ----------
  x : array-like, shape=(n_samples,)
      The time series vector.
  
  Returns
  -------
  pval : float
      The computed P-value of the test.
  
  sig : bool
      Whether the P-value is significant at the ``alpha`` level.
      More directly, whether to difference the time series.
docstr_tok: ["Test","whether","the","time","series","is","stationary","or","it","needs","differencing",".","Parameters","--","--","--","--","--","x",":","array-like",",","shape=","(","n_samples",",",")","The","time","series","vector",".","Returns","--","--","--","-","pval",":","float","The","computed","P-value","of","the","test",".","sig",":","bool","Whether","the","P-value","is","significant","at","the","``","alpha","``","level",".","More","directly",",","whether","to","difference","the","time","series","."]
code: def should_diff(self, x):
      """Test whether the time series is stationary or it needs differencing.
  
      Parameters
      ----------
      x : array-like, shape=(n_samples,)
          The time series vector.
  
      Returns
      -------
      pval : float
          The computed P-value of the test.
  
      sig : bool
          Whether the P-value is significant at the ``alpha`` level.
          More directly, whether to difference the time series.
      """
  
imports: from sklearn.base import BaseEstimator
  from sklearn.linear_model import LinearRegression
  from statsmodels import api
  from abc import ABCMeta, abstractmethod
  import numpy
  from ..compat.numpy import DTYPE
  from ..decorators import deprecated
  from ..utils.array import c, diff, check_endog
  from .approx import approx
  from ._arima import C_tseries_pp_sum
label_desc: Use image node_id 2 for calling the _DifferencingStationarityTest obj's underlying member method code with example usage: obj.should_diff(x) without return types