class_docstr: Individual experimental unit for
  EM implementation of (repeated measures)
  mixed effects model.
  
  'Maximum Likelihood Computations with Repeated Measures:
  Application of the EM Algorithm'
  
  Nan Laird; Nicholas Lange; Daniel Stram
  
  Journal of the American Statistical Association,
  Vol. 82, No. 397. (Mar., 1987), pp. 97-105.
  
  
  Parameters
  ----------
  endog : ndarray, (nobs,)
      response, endogenous variable
  exog_fe : ndarray, (nobs, k_vars_fe)
      explanatory variables as regressors or fixed effects,
      should include exog_re to correct mean of random
      coefficients, see Notes
  exog_re : ndarray, (nobs, k_vars_re)
      explanatory variables or random effects or coefficients
  
  Notes
  -----
  If the exog_re variables are not included in exog_fe, then the
  mean of the random constants or coefficients are not centered.
  The covariance matrix of the random parameter estimates are not
  centered in this case. (That's how it looks to me. JP)
class_docstr_tok: ["Individual","experimental","unit","for","EM","implementation","of","(","repeated","measures",")","mixed","effects","model",".","'Maximum","Likelihood","Computations","with","Repeated","Measures",":","Application","of","the","EM","Algorithm'","Nan","Laird",";","Nicholas","Lange",";","Daniel","Stram","Journal","of","the","American","Statistical","Association",",","Vol",".","82",",","No",".","397",".","(","Mar.",",","1987",")",",","pp",".","97-105",".","Parameters","--","--","--","--","--","endog",":","ndarray",",","(","nobs",",",")","response",",","endogenous","variable","exog_fe",":","ndarray",",","(","nobs",",","k_vars_fe",")","explanatory","variables","as","regressors","or","fixed","effects",",","should","include","exog_re","to","correct","mean","of","random","coefficients",",","see","Notes","exog_re",":","ndarray",",","(","nobs",",","k_vars_re",")","explanatory","variables","or","random","effects","or","coefficients","Notes","--","--","-","If","the","exog_re","variables","are","not","included","in","exog_fe",",","then","the","mean","of","the","random","constants","or","coefficients","are","not","centered",".","The","covariance","matrix","of","the","random","parameter","estimates","are","not","centered","in","this","case",".","(","That","'s","how","it","looks","to","me",".","JP",")"]
code: def __init__(self, endog, exog_fe, exog_re):
      self.Y = endog
      self.X = exog_fe
      self.Z = exog_re
      self.n = endog.shape[0]
  
imports: import numpy
  import numpy.linalg
  from statsmodels.base.model import LikelihoodModelResults
  from statsmodels.tools.decorators import cache_readonly
label_desc: Use image node_id 1 to create a new Unit object  with example: obj = Unit(endog, exog_fe, exog_re)