confounders_clsq: Check for confounding factors

Description Usage Arguments Value Examples

View source: R/confounders_clsq_class.R

Description

Univariate least squares regression models are used to compare models with and without potential confounding factors included. The change in coefficients (delta) is then computed for each potential confounding factor. Factors with a large delta are said to be having a large impact on the model and are therefore confounding. p-values are computed for models with confounders included to reduce potential false positives. Only suitable for main factors with 2 levels.

Usage

1
2
3
4
5
6
7
8
confounders_clsq(
  alpha = 0.05,
  mtc = "fdr",
  factor_name,
  confounding_factors,
  threshold = 0.15,
  ...
)

Arguments

alpha

(numeric) The p-value cutoff for determining significance. The default is 0.05.

mtc

(character) Multiple test correction method. Allowed values are limited to the following:

  • "bonferroni": Bonferroni correction in which the p-values are multiplied by the number of comparisons.

  • "fdr": Benjamini and Hochberg False Discovery Rate correction.

  • "none": No correction.

The default is "fdr".

factor_name

(character) The name of the main factor with which other factors may be confounding.

confounding_factors

(character) The name(s) of factor(s) that are potential confounding factors.

threshold

(numeric) Factors with a delta greater than the the threshold are considered to be confounding. The default is 0.15.

...

Additional slots and values passed to struct_class.

Value

A confounders_clsq object.

Examples

1
2
3
4
5
6
7
8
D = MTBLS79_DatasetExperiment()
M = filter_by_name(mode='include',dimension='variable',
        names=colnames(D$data)[1:10]) + # first 10 features
    filter_smeta(mode='exclude',levels='QC',
        factor_name='class') + # reduce to two group comparison
    confounders_clsq(factor_name = 'class',
        confounding_factors=c('sample_order','batch'))
M = model_apply(M,D)

structToolbox documentation built on Nov. 8, 2020, 6:54 p.m.