check.confounders: Check for potential confounders in the metadata

View source: R/check_confounders.r

check.confoundersR Documentation

Check for potential confounders in the metadata

Description

Checks potential confounders in the metadata and visualize the results

Usage

check.confounders(siamcat, fn.plot, meta.in = NULL,
feature.type='filtered', verbose = 1)

Arguments

siamcat

an object of class siamcat-class

fn.plot

string, filename for the pdf-plot

meta.in

vector, specific metadata variable names to analyze, defaults to NULL (all metadata variables will be analyzed)

feature.type

string, on which type of features should the function work? Can be either c()"original", "filtered", or "normalized"). Please only change this paramter if you know what you are doing!

verbose

integer, control output: 0 for no output at all, 1 for only information about progress and success, 2 for normal level of information and 3 for full debug information, defaults to 1

Details

This function checks for associations between class labels and potential confounders (e.g. Age, Sex, or BMI) that are present in the metadata. Statistical testing is performed with Fisher's exact test or Wilcoxon test, while associations are visualized either as barplot or Q-Q plot, depending on the type of metadata.

Additionally, it evaluates associations among metadata variables using conditional entropy and associations with the label using generalized linear models, producing a correlation heatmap and appropriate quantitative barplots, respectively.

Please note that the confounder check is currently only available for binary classification problems!

Value

Does not return anything, but outputs plots to specified pdf file

Examples

# Example data
data(siamcat_example)

# Simple working example
check.confounders(siamcat_example, './conf_plot.pdf')

zellerlab/siamcat documentation built on Feb. 1, 2024, 2:21 a.m.