PermTestSurv.Rd
Given an OmicsSurv
object and a list of pathway principal
components (PCs) from the ExtractAESPCs
function, test if
each pathway with features recorded in the bioassay design matrix is
significantly related to the survival output.
PermTestSurv( OmicsSurv, pathwayPCs_ls, numReps = 0L, parallel = FALSE, numCores = NULL, ... ) # S4 method for OmicsSurv PermTestSurv( OmicsSurv, pathwayPCs_ls, numReps = 0L, parallel = FALSE, numCores = NULL, ... )
OmicsSurv  A data object of class 

pathwayPCs_ls  A list of pathway PC matrices returned by the

numReps  How many permutations to estimate the \(p\)value? Defaults
to 0 (that is, to estimate the \(p\)value parametrically). If

parallel  Should the computation be completed in parallel? Defaults to

numCores  If 
...  Dots for additional internal arguments (currently unused). 
A named vector of pathway permutation \(p\)values.
This function takes in a list of the first principal components
from each pathway and an object of class OmicsSurv
. This function
will then calculate the AIC of a Cox Proportional Hazards model (via the
coxph
function) with the original observations as
response and the pathway principal components as the predictor matrix. Note
that the AIC and loglikelihood are proportional because the number of
parameters in each pathway is constant.
Then, this function will create numReps
permutations of the survival
response, fit models to each of these permuted responses (holding the path
predictor matrix fixed), and calculate the AIC of each model. This function
will return a named vector of permutation \(p\)values, where the value
for each pathway is the proportion of models for which the AIC of the
permuted response model is less than the AIC of the original model.
# DO NOT CALL THIS FUNCTION DIRECTLY. # Use AESPCA_pVals() instead if (FALSE) { ### Load the Example Data ### data("colonSurv_df") data("colon_pathwayCollection") ### Create an OmicsSurv Object ### colon_Omics < CreateOmics( assayData_df = colonSurv_df[, (2:3)], pathwayCollection_ls = colon_pathwayCollection, response = colonSurv_df[, 1:3], respType = "surv" ) ### Extract Pathway PCs and Loadings ### colonPCs_ls < ExtractAESPCs( object = colon_Omics, parallel = TRUE, numCores = 2 ) ### Pathway pValues ### PermTestSurv( OmicsSurv = colon_Omics, pathwayPCs_ls = colonPCs_ls$PCs, parallel = TRUE, numCores = 2 ) }