confounders_lsq_barchart: Confounding factor relative change barchart

Description Usage Arguments Value Examples

View source: R/confounders_clsq_class.R

Description

A barchart of the relative change (delta) in regression coefficient when potential confounding factors are included, and excluded, from the model. Factors with a large delta are considered to be confounding factors.

Usage

1
confounders_lsq_barchart(feature_to_plot, threshold = 10, ...)

Arguments

feature_to_plot

(numeric, character, integer) The column name of the feature to be plotted.

threshold

(numeric) A horizontal line is plotted to indicate the threshold. The default is 10.

...

Additional slots and values passed to struct_class.

Value

A confounders_lsq_barchart object.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
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)
C = C=confounders_lsq_barchart(feature_to_plot=1,threshold=15)
chart_plot(C,M[3])

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