inmoose.limma.makeContrasts
- inmoose.limma.makeContrasts(contrasts, levels)
Construct the contrast matrix corresponding to specified contrasts of a set of parameters.
This function expresses contrasts between a set of parameters as a numeric matrix. The parameters are usually the coefficients from a linear model fit, so the matrix specifies which comparisons between the coefficients are to be extracted from the fit. The output from this function is usually used as input to
contrasts_fit().- Parameters:
contrasts (list) – strings parseable as expressions that describe the contrasts if
contrastsis a string, it will be interpreted as a list of one elementlevels (list or Factor or patsy.DesignMatrix) – list of strings or factor the names of the parameters of which contrasts are desired, or a design matrix or other object with the parameter names as column names.
- Returns:
matrix with columns corresponding to contrasts
- Return type:
pd.DataFrame