PomaOddsRatio: Logistic Regression Model Odds Ratios

View source: R/PomaOddsRatio.R

PomaOddsRatioR Documentation

Logistic Regression Model Odds Ratios

Description

PomaOddsRatio calculates the Odds Ratios for each feature from a logistic regression model using the binary outcome (group/type must be a binary factor) as a dependent variable.

Usage

PomaOddsRatio(data, feature_name = NULL, covs = NULL, show_ci = TRUE)

Arguments

data

A SummarizedExperiment object.

feature_name

Character vector. Indicates the name/s of feature/s that will be used to fit the model. If it's NULL (default), all variables will be included in the model.

covs

Character vector. Indicates the names of colData columns to be included as covariates. Default is NULL (no covariates).

show_ci

Logical. Indicates if the 95% confidence intervals will be plotted. Default is TRUE.

Value

A list with results including plots and tables.

Author(s)

Pol Castellano-Escuder

Examples

data <- POMA::st000336 %>% # Example SummarizedExperiment object included in POMA
  PomaImpute() %>% 
  PomaNorm()

## Output is a list with objects `odds_ratio_table` (tibble) and `odds_ratio_plot` (ggplot2 object)
data %>% 
  PomaOddsRatio(feature_name = c("glutamic_acid", "glutamine", "glycine", "histidine"),
                covs = NULL, 
                show_ci = TRUE)

# With covariates
data %>% 
  PomaOddsRatio(feature_name = c("glutamic_acid", "glutamine", "glycine", "histidine"),
                covs = "steroids", 
                show_ci = TRUE)

pcastellanoescuder/POMA_package documentation built on Oct. 13, 2024, 8:47 p.m.