compute_significance_data: Compute associations with phenotypical variables.

Description Usage Arguments Details Value

Description

Compute associations with phenotypical and control variables in order to find out which of them are significant, and thus possibly introducing some confounding in the data.

Usage

1
2
compute_significance_data(values, pdata, component_names, method = c("lm",
  "kruskal"))

Arguments

values

A matrix containing either principal components or surrogate variables.

pdata

A data.frame containing the phenotypical data for the samples.

component_names

A character vector containing the component names.

method

A character indicating the method used for the association tests.

Details

The current implementation allows the user to use two different methods for testing association: a general linear model (lm) and a Kruskal-Wallis test. User should be careful, as the Kruskal Wallis test should not be used for continuous independent variables.

An association test is performed between every component (Principal Component or Surrogate Variable) and every phenotype and control variable. P-values are then collected and stored in a tbl_df object describing all the comparisons.

Value

A data.frame with the results of the association tests.


Keyeoh/svconfound documentation built on May 15, 2019, 1:25 p.m.