class_docstr: Restricted general least squares model that handles linear constraints
  
  Parameters
  ----------
  endog : array_like
      n length array containing the dependent variable
  exog : array_like
      n-by-p array of independent variables
  constr : array_like
      k-by-p array of linear constraints
  param : array_like or scalar
      p-by-1 array (or scalar) of constraint parameters
  sigma (None): scalar or array_like
      The weighting matrix of the covariance. No scaling by default (OLS).
      If sigma is a scalar, then it is converted into an n-by-n diagonal
      matrix with sigma as each diagonal element.
      If sigma is an n-length array, then it is assumed to be a diagonal
      matrix with the given sigma on the diagonal (WLS).
  
  Notes
  -----
  endog = exog * beta + epsilon
  weights' * constr * beta = param
  
  See Greene and Seaks, "The Restricted Least Squares Estimator:
  A Pedagogical Note", The Review of Economics and Statistics, 1991.
class_docstr_tok: ["Restricted","general","least","squares","model","that","handles","linear","constraints","Parameters","--","--","--","--","--","endog",":","array_like","n","length","array","containing","the","dependent","variable","exog",":","array_like","n-by-p","array","of","independent","variables","constr",":","array_like","k-by-p","array","of","linear","constraints","param",":","array_like","or","scalar","p-by-1","array","(","or","scalar",")","of","constraint","parameters","sigma","(","None",")",":","scalar","or","array_like","The","weighting","matrix","of","the","covariance",".","No","scaling","by","default","(","OLS",")",".","If","sigma","is","a","scalar",",","then","it","is","converted","into","an","n-by-n","diagonal","matrix","with","sigma","as","each","diagonal","element",".","If","sigma","is","an","n-length","array",",","then","it","is","assumed","to","be","a","diagonal","matrix","with","the","given","sigma","on","the","diagonal","(","WLS",")",".","Notes","--","--","-","endog","=","exog","*","beta","+","epsilon","weights","'","*","constr","*","beta","=","param","See","Greene","and","Seaks",",","``","The","Restricted","Least","Squares","Estimator",":","A","Pedagogical","Note","''",",","The","Review","of","Economics","and","Statistics",",","1991","."]
docstr: Whitened exogenous variables augmented with restrictions
docstr_tok: ["Whitened","exogenous","variables","augmented","with","restrictions"]
code: def rwexog(self):
      """Whitened exogenous variables augmented with restrictions"""
      if self._rwexog is None:
          P = self.ncoeffs
          K = self.nconstraint
          design = np.zeros((P + K, P + K))
          design[:P, :P] = np.dot(self.wexog.T, self.wexog)  # top left
          constr = np.reshape(self.constraint, (K, P))
          design[:P, P:] = constr.T  # top right partition
          design[P:, :P] = constr  # bottom left partition
          design[P:, P:] = np.zeros((K, K))  # bottom right partition
          self._rwexog = design
      return self._rwexog
  
file_path: statsmodels/statsmodels/sandbox/rls.py
imports: import numpy
  from statsmodels.regression.linear_model import GLS, RegressionResults
label_desc: Use image node_id 2 for calling the RLS obj's underlying member method code with example usage: obj.rwexog() and returns: self