'Parameters
lhs : ndarray
A q x p matrix which is the left hand side of the
constraint lhs * param = rhs.  The number of constraints is
q >= 1 and p is the dimension of the parameter vector.
rhs : ndarray
A 1-dimensional vector of length q which is the right hand
side of the constraint equation.
exog : ndarray
The n x p exognenous data for the full model.'

def __init__(self, lhs, rhs, exog):

    rhs = np.atleast_1d(rhs.squeeze())
    if (rhs.ndim > 1):
        raise ValueError('The    right    hand    side    of    the    constraint    must    be    a    vector.')
    if (len(rhs) != lhs.shape[0]):
        raise ValueError('The    number    of    rows    of    the    left    hand    side    constraint    matrix    L    must    equal    the    length    of    the    right    hand    side    constraint    vector    R.')
    self.lhs = lhs
    self.rhs = rhs
    (lhs_u, lhs_s, lhs_vt) = np.linalg.svd(lhs.T, full_matrices=1)
    self.lhs0 = lhs_u[:, len(lhs_s):]
    self.lhs1 = lhs_u[:, 0:len(lhs_s)]
    self.lhsf = np.hstack((self.lhs0, self.lhs1))
    self.param0 = np.dot(self.lhs1, (np.dot(lhs_vt, self.rhs) / lhs_s))
    self._offset_increment = np.dot(exog, self.param0)
    self.orig_exog = exog
    self.exog_fulltrans = np.dot(exog, self.lhsf)
