matrices.DesignMatrices

matrices.DesignMatrices(model, data, env)

A wrapper of the response, the common, and group specific effects.

Parameters

model : Model

The model description, the result of calling model_description.

data : pandas.DataFrame

The data frame where variables are taken from.

env : Environment

The environment where values and functions are taken from.

Attributes

response : ResponseMatrix

The response in the model. Access its values with self.response.design_matrix. It is None if there is no response term in the model.

common : CommonEffectsMatrix

The common effects (a.k.a. fixed effects) in the model. The design matrix can be accessed with self.common.design_matrix. The submatrix for a term is accessed via self.common[term_name]. It is None if there are no common terms in the model.

group : GroupEffectsMatrix

The group specific effects (a.k.a. random effects) in the model. The design matrix can be accessed with self.group.design_matrix. The submatrix for a term is accessed via self.group[term_name]. It is None if there are no group specific terms in the model.