lyman.glm.contrast_matrix¶
-
lyman.glm.
contrast_matrix
(contrast, design_matrix)[source]¶ Return a contrast matrix that is valid for a given design matrix.
- Parameters
- contrasttuple
A tuple with (1) the name of the contrast, (2) the involved regressors, and (3) the weight to use for each of those regressors.
- design_matrixdataframe
Design matrix with regressor names corresponding to contrast elements.
- Returns
- contrast_matrixseries
Contrast weights with regressor names as the index.