3.5.3.3.15. statsmodels.genmod.generalized_estimating_equations.ParameterConstraint

class statsmodels.genmod.generalized_estimating_equations.ParameterConstraint(lhs, rhs, exog)[source]

A class for managing linear equality constraints for a parameter vector.

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.

__init__(lhs, rhs, exog)[source]
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.

3.5.3.3.15.1. Methods

__init__(lhs, rhs, exog)
Parameters:
offset_increment() Returns a vector that should be added to the offset vector to accommodate the constraint.
reduced_exog() Returns a linearly transformed exog matrix whose columns span the constrained model space.
restore_exog() Returns the full exog matrix before it was reduced to satisfy the constraint.
unpack_cov(bcov) Converts the covariance matrix bcov from reduced to full coordinates.
unpack_param(params) Converts the parameter vector params from reduced to full coordinates.