PermTestCateg: AES-PCA permutation test of categorical response for pathway...

Description Usage Arguments Details Value See Also Examples

Description

Given an OmicsCateg object and a list of pathway PCs from the ExtractAESPCs function, test if each pathway with features recorded in the bio-assay design matrix is significantly related to the categorical response.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
PermTestCateg(
  OmicsCateg,
  pathwayPCs_ls,
  numReps = 0L,
  parallel = FALSE,
  numCores = NULL,
  ...
)

## S4 method for signature 'OmicsCateg'
PermTestCateg(
  OmicsCateg,
  pathwayPCs_ls,
  numReps = 0L,
  parallel = FALSE,
  numCores = NULL,
  ...
)

Arguments

OmicsCateg

A data object of class OmicsCateg, created by the CreateOmics function.

pathwayPCs_ls

A list of pathway PC matrices returned by the ExtractAESPCs function.

numReps

How many permutations to estimate the p-value? Defaults to 0 (that is, to estimate the p-value parametrically). If numReps > 0, then the non-parametric, permutation p-value will be returned based on the number of random samples specified.

parallel

Should the computation be completed in parallel? Defaults to FALSE.

numCores

If parallel = TRUE, how many cores should be used for computation? Internally defaults to the number of available cores minus 2.

...

Dots for additional internal arguments (currently unused).

Details

This function takes in a list of the first principal components from each pathway and an object of class OmicsCateg. This function will then calculate the AIC of a multivariate generalized linear model (via the glm function with a binomial error family) with the original observations as response and the pathway principal components as the predictor matrix.

Then, this function will create numReps permutations of the categorical 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. Note that the AIC and log-likelihood are proportional because the number of parameters in each pathway is constant.

In future versions, this function will also be able to calculate permuted p-values for multinomial logistic regression and proportional odds logistic regression models, for n-ary and ordered categorical responses, respectively.

Value

A named vector of pathway permutation p-values.

See Also

CreateOmics; ExtractAESPCs; glm; binomial; SampleCateg

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
  # DO NOT CALL THIS FUNCTION DIRECTLY.
  # Use AESPCA_pVals() instead

## Not run: 
  ###  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[, c(1,3)],
    respType = "categ"
  )

  ###  Extract Pathway PCs and Loadings  ###
  colonPCs_ls <- ExtractAESPCs(
    object = colon_Omics,
    parallel = TRUE,
    numCores = 2
  )

  ###  Pathway p-Values  ###
  PermTestCateg(
    OmicsCateg = colon_Omics,
    pathwayPCs_ls = colonPCs_ls$PCs,
    parallel = TRUE,
    numCores = 2
  )

## End(Not run)

pathwayPCA documentation built on Dec. 15, 2020, 6:14 p.m.