Calculate_padjMFC: Calculate_padjMFC

Calculate_padjMFCR Documentation

Calculate_padjMFC

Description

Calculate_padjMFC calculates the paired, adjusted maximum fold change (padjMFC)

Usage

Calculate_padjMFC(
  dat,
  fcCol = "fc_norm_max_ivt",
  d0Col = "d0_norm_paired",
  discretize = c(0.2, 0.3),
  scaleResiduals = FALSE,
  responseLabels = paste0(c("low", "moderate", "high"), "Responder"),
  ...
)

Arguments

dat

the data containing the columns fcCol and d0Col

fcCol

character string specifying the name of the fold change column from dat

d0Col

character string specifying the name of the day 0 column from dat

discretize

a vector of quantiles in (0, 0.5] specifying where to make the cutoff for low, moderate and high responses. Default is 20% and 30%.

scaleResiduals

Logical. Should residuals be scaled inversely by the square of the confidence intervals from the linear model.

responseLabels

names for low, moderate and high responses

...

Additional arguments passed to lm

Details

Calculate the paired, adjusted maximum fold change (padjMFC) from fc_norm_max_ivt and d0_norm_paired using linear regression to remove the effect of baseline titers. Missing (NA) values are handled and any missing values in fcCol and d0Col will also be missing in the output.

Value

A list with the first element named "linearModel" for the linear model and then "padjMFC" containing the continuous padjMFC metric and one additional element for each value of discretize giving the discrete labels.

Author(s)

Stefan Avey

See Also

lm

Examples

## First Example


stefanavey/titer documentation built on Jan. 27, 2023, 3:41 a.m.