| getContrast,StatModel-method {msqrob2} | R Documentation |
Methods for StatModel class
to calculate contrasts of the model parameters
to calculate the variance-covariance matrix of the contrasts
## S4 method for signature 'StatModel' getContrast(object, L) ## S4 method for signature 'StatModel' varContrast(object, L)
object |
A list with elements of the class |
L |
contrast |
A matrix with the calculated contrasts or variance-covariance matrix of contrasts
data(pe)
# Aggregate peptide intensities in protein expression values
pe <- aggregateFeatures(pe, i = "peptide", fcol = "Proteins", name = "protein")
# Fit msqrob model
pe <- msqrob(pe, i = "protein", formula = ~condition)
# Define contrast
getCoef(rowData(pe[["protein"]])$msqrobModels[[1]])
# Define contrast for log2 fold change between condition c and condition b:
L <- makeContrast("conditionc - conditionb=0", c("conditionb", "conditionc"))
getContrast(rowData(pe[["protein"]])$msqrobModels[[1]], L)
varContrast(rowData(pe[["protein"]])$msqrobModels[[1]], L)