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: Initialize AR model instance.
  
  Parameters
  ----------
  design : ndarray
      2D array with design matrix.
  
  rho : int or array-like
      If int, gives order of model, and initializes rho to zeros.  If
      ndarray, gives initial estimate of rho. Be careful as ``ARModel(X,
      1) != ARModel(X, 1.0)``.
docstr_tok: ["Initialize","AR","model","instance",".","Parameters","--","--","--","--","--","design",":","ndarray","2D","array","with","design","matrix",".","rho",":","int","or","array-like","If","int",",","gives","order","of","model",",","and","initializes","rho","to","zeros",".","If","ndarray",",","gives","initial","estimate","of","rho",".","Be","careful","as","``","ARModel","(","X",",","1",")","!","=","ARModel","(","X",",","1.0",")","``","."]
code: def __init__(self, design, rho):
      """Initialize AR model instance.
  
      Parameters
      ----------
      design : ndarray
          2D array with design matrix.
  
      rho : int or array-like
          If int, gives order of model, and initializes rho to zeros.  If
          ndarray, gives initial estimate of rho. Be careful as ``ARModel(X,
          1) != ARModel(X, 1.0)``.
  
      """
      if isinstance(rho, int):
          self.order = rho
          self.rho = np.zeros(self.order, np.float64)
      else:
          self.rho = np.squeeze(np.asarray(rho))
          if len(self.rho.shape) not in [0, 1]:
              raise ValueError(
                  "AR parameters must be a scalar or a vector"
              )
          if self.rho.shape == ():
              self.rho.shape = (1,)
          self.order = self.rho.shape[0]
      super().__init__(design)
  
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 1 to create a new ARModel object from inherited base classes: OLSModel with example: obj = ARModel(design, rho)