runPCPR2: The Principal Component R-squared method (PC-PR2)

Description Usage Arguments Value Examples

View source: R/runPCPR2.R

Description

Runs the PC-PR2 method on X, an omics matrix of intensities, and Z, the subject metadata to be assessed in the model.

Usage

1
runPCPR2(X, Z, pct.threshold = 0.8)

Arguments

X

A matrix of omics data. It is recommended that the data be appropriately scaled and log transformed if necessary.

Z

A data frame of subject metadata, with the same number of rows as X, whose influence on the omics data is to be assessed. Categorical variables should be coded as factors.

pct.threshold

The proportion of variability desired to be explained. Defaults to 0.8.

Value

Returns a list with 6 elements:

dimensions

dimensions of the -omics matrix

types

data types for each Z-variable

threshold

the chosen variability to be explained

pcn

the number of principal components used for the chosen threshold

anovaFit

ANOVA output for each PC

pR2

Rpartial2 values for each Z-variable and the overall R2

Examples

1
2
output <- runPCPR2(transcripts, Z_metadata)
output$pR2

JoeRothwell/pcpr2 documentation built on June 17, 2021, 8:58 a.m.