Learn R Programming

pmartR (version 2.4.6)

rmd_conversion: Conversion between log2(RMD) and p-value

Description

This function provides a conversion between the log base 2 robust Mahalanobis distance value and p-value for output from the rmd_runs function

Usage

rmd_conversion(log2rmd = NULL, pval = NULL, df)

Value

The function returns the corresponding p-value or log base 2 robust Mahalanobis when the other parameter is specified.

Arguments

log2rmd

numeric log base 2 transformed robust Mahalanobis distance value

pval

numeric p-value associated with rmd_runs algorithm

df

integer value specifying the degrees of freedom associated with the test, which should be equal to the number of metrics used in rmd_runs

Author

Lisa Bramer

Details

Only one of log2rmd and pval should be provided. The input not provided will be solved for based on the provided input.

Examples

Run this code
if (FALSE) { # requireNamespace("pmartRdata", quietly = TRUE)
library(pmartRdata)
mymetab <- edata_transform(
  omicsData = metab_object,
  data_scale = "log2"
)
mymetab <- group_designation(
  omicsData = mymetab,
  main_effects = "Phenotype"
)
rmd_results <- rmd_filter(
  omicsData = mymetab,
  metrics = c("MAD", "Skewness", "Correlation")
)
rmd_conversion(log2rmd = rmd_results$Log2.md, df = 3)

rmd_conversion(pval = .0001, df = 3)
rmd_conversion(log2rmd = 4.5, df = 3)
}

Run the code above in your browser using DataLab