PomaPCR: Principal Components Regression

View source: R/PomaPCR.R

PomaPCRR Documentation

Principal Components Regression

Description

PomaPCR performs Principal Components Regression.

Usage

PomaPCR(data, center = TRUE, scale = TRUE, ncomp = 2, y = NULL, adjust = "fdr")

Arguments

data

A SummarizedExperiment object.

center

Logical. Indicates whether the variables should be shifted to be zero centered. Default is TRUE.

scale

Logical. Indicates whether the variables should be scaled to have unit variance before the analysis takes place. Default is TRUE.

ncomp

Numeric. Indicates the number of principal components used as predictors in the model. Default is 2.

y

Character. Indicates the name of colData columns to be used as dependent variable. If it's set to NULL, the first numeric variable in colData will be used as the dependent variable.

adjust

Character. Multiple comparisons correction method to adjust p-values. Available options are: "fdr" (false discovery rate), "holm", "hochberg", "hommel", "bonferroni", "BH" (Benjamini-Hochberg), and "BY" (Benjamini-Yekutieli).

Value

A tibble with the results.

Author(s)

Pol Castellano-Escuder

Examples

data("st000284")

# PCR with 2 components
st000284 %>%
  PomaPCR(y = "age_at_consent")
  
# PCR with 20 components
st000284 %>%
  PomaPCR(ncomp = 20)

pcastellanoescuder/POMA documentation built on March 15, 2024, 10:08 p.m.