adjust_batch has performed
adjustment for batch effects,
provides an overview of parameters and adjustment models.
Information is only available about the most recent
adjust_batch on a dataset.
Batch-adjusted dataset (in which
adjust_method Method used for batch adjustment
markers Variables of biomarkers for adjustment
suffix Suffix appended to variable names
batchvar Variable indicating batch
confounders Confounders, i.e. determinants of
biomarker levels that differ between batches.
Returned only if used by the model.
adjust_parameters Tibble of parameters used to
obtain adjust biomarker levels. Parameters differ between
ipw: Estimated adjustment
parameters are a tibble with one
quantreg returns a tibble with numerous values per
.batchvar: unadjusted (
ad_...) estimates of the lower (
upper quantile (
..._hi) and interquantile range (
plus the lower (
all_lo) and upper quantiles (
across all batches.
quantnorm does not explicitly estimate parameters.
model_fits List of model fit objects, one
per biomarker. Models differ between methods:
standardize: Linear regression model for the biomarker with
confounders as predictors, from which
marginal predictions of batch means for each batch are obtained.
ipw: Logistic (2 batches) or multinomial models for assignment
to a specific batch with
.batchvar as the response and
confounders as the predictors, used to generate stabilized
inverse-probability weights that are then used in a linear regression
model to estimate marginally standardized batch means.
quantreg: Quantile regression with the marker as the response
confounders as predictors.
quantnorm do not fit any regression models.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27
# Data frame with two batches # Batch 2 has higher values of biomarker and confounder df <- data.frame( tma = rep(1:2, times = 10), biomarker = rep(1:2, times = 10) + runif(max = 5, n = 20), confounder = rep(0:1, times = 10) + runif(max = 10, n = 20) ) # Adjust for batch effects df2 <- adjust_batch( data = df, markers = biomarker, batch = tma, method = quantreg, confounders = confounder ) # Show overview of model diagnostics: diagnose_models(data = df2) # Obtain first fitted regression model: fit <- diagnose_models(data = df2)$model_fits[][] # Obtain residuals for this model: residuals(fit)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.