class_docstr: Sliced Inverse Regression (SIR)
  
  Parameters
  ----------
  endog : array_like (1d)
      The dependent variable
  exog : array_like (2d)
      The covariates
  
  References
  ----------
  KC Li (1991).  Sliced inverse regression for dimension reduction.
  JASA 86, 316-342.
class_docstr_tok: ["Sliced","Inverse","Regression","(","SIR",")","Parameters","--","--","--","--","--","endog",":","array_like","(","1d",")","The","dependent","variable","exog",":","array_like","(","2d",")","The","covariates","References","--","--","--","--","--","KC","Li","(","1991",")",".","Sliced","inverse","regression","for","dimension","reduction",".","JASA","86",",","316-342","."]
docstr: Estimate the EDR space using Sliced Inverse Regression.
  
  Parameters
  ----------
  slice_n : int, optional
      Target number of observations per slice
docstr_tok: ["Estimate","the","EDR","space","using","Sliced","Inverse","Regression",".","Parameters","--","--","--","--","--","slice_n",":","int",",","optional","Target","number","of","observations","per","slice"]
code: def fit(self, slice_n=20, **kwargs):
      """
      Estimate the EDR space using Sliced Inverse Regression.
  
      Parameters
      ----------
      slice_n : int, optional
          Target number of observations per slice
      """
  
      # Sample size per slice
      if len(kwargs) > 0:
          msg = "SIR.fit does not take any extra keyword arguments"
          warnings.warn(msg)
  
      # Number of slices
      n_slice = self.exog.shape[0] // slice_n
  
      self._prep(n_slice)
  
      mn = [z.mean(0) for z in self._split_wexog]
      n = [z.shape[0] for z in self._split_wexog]
      mn = np.asarray(mn)
      n = np.asarray(n)
  
      # Estimate Cov E[X | Y=y]
      mnc = np.dot(mn.T, n[:, None] * mn) / n.sum()
  
      a, b = np.linalg.eigh(mnc)
      jj = np.argsort(-a)
      a = a[jj]
      b = b[:, jj]
      params = np.linalg.solve(self._covxr.T, b)
  
      results = DimReductionResults(self, params, eigs=a)
      return DimReductionResultsWrapper(results)
  
imports: import warnings
  import numpy
  import pandas
  from statsmodels.base import model
  import statsmodels.base.wrapper
  from statsmodels.tools.sm_exceptions import ConvergenceWarning
label_desc: Use image node_id 1 for calling the SlicedInverseReg obj's underlying member method code with example usage: obj.fit(slice_n) and returns: DimReductionResultsWrapper