class_docstr: A regression model with an AR(p) covariance structure.
  
  In terms of a LikelihoodModel, the parameters
  are beta, the usual regression parameters,
  and sigma, a scalar nuisance parameter that
  shows up as multiplier in front of the AR(p) covariance.
docstr: Whiten a series of columns according to AR(p) covariance structure.
  
  Parameters
  ----------
  X : array-like of shape (n_features)
      Array to whiten.
  
  Returns
  -------
  whitened_X : ndarray
      X whitened with order self.order AR.
docstr_tok: ["Whiten","a","series","of","columns","according","to","AR","(","p",")","covariance","structure",".","Parameters","--","--","--","--","--","X",":","array-like","of","shape","(","n_features",")","Array","to","whiten",".","Returns","--","--","--","-","whitened_X",":","ndarray","X","whitened","with","order","self.order","AR","."]
code: def whiten(self, X):
      """Whiten a series of columns according to AR(p) covariance structure.
  
      Parameters
      ----------
      X : array-like of shape (n_features)
          Array to whiten.
  
      Returns
      -------
      whitened_X : ndarray
          X whitened with order self.order AR.
  
      """
      X = np.asarray(X, np.float64)
      whitened_X = X.copy()
      for i in range(self.order):
          whitened_X[(i + 1) :] = (
              whitened_X[(i + 1) :] - self.rho[i] * X[: -(i + 1)]
          )
      return whitened_X
  
imports: import numpy
  import scipy.linalg
  from nibabel.onetime import auto_attr
  from numpy.linalg import matrix_rank
  from nilearn.glm._utils import positive_reciprocal
  from nilearn.glm.model import LikelihoodModelResults
label_desc: Use image node_id 2 for calling the ARModel obj's underlying member method code with example usage: obj.whiten(X) and returns: whitened_X