superpc.st: Extract and test principal components from supervised PCA

Description Usage Arguments Details Value See Also Examples

View source: R/superPC_model_tStats.R

Description

Identify p_{path} significant features, extract principal components (PCs) from those specific features to construct a data matrix, predict the response with this data matrix, and record the model fit statistic of this prediction.

Usage

1
2
3
4
5
6
7
8
9
superpc.st(
  fit,
  data,
  n.threshold = 20,
  threshold.ignore = 0,
  n.PCs = 1,
  min.features = 3,
  epsilon = 1e-06
)

Arguments

fit

An object of class superpc returned by the function superpc.train.

data

A list of test data:

  • x : A "tall" pathway data frame (p_{path} \times N).

  • y : A response vector corresponding to type.

  • censoring.status : If type = "survival", the censoring indicator (1 - the observed event indicator). Otherwise, NULL.

  • featurenames : A character vector of the measured -Omes in x.

n.threshold

The number of bins into which to split the feature scores returned in the fit object.

threshold.ignore

Calculate the model for feature scores above this percentile of the threshold. We have observed that the smallest threshold values (0% - 40%) largely have no effect on model t-scores. Defaults to 0.00 (0%).

n.PCs

The number of PCs to extract from the pathway.

min.features

What is the smallest number of genes allowed in each pathway? This argument must be kept constant across all calls to this function which use the same pathway list. Defaults to 3.

epsilon

I'm not sure why this is important. It's called when comparing the absolute score values to each value of the threshold vector. Defaults to 10^{-6}.

Details

NOTE: the number of thresholds at which to test (n.threshold) can be larger than the number of features to bin. This will result in constant t-statistics for the first few bins because the model isn't changing.

See https://web.stanford.edu/~hastie/Papers/spca_JASA.pdf.

Value

A list containing:

See Also

superpc.train; SuperPCA_pVals

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
33
34
35
36
  # DO NOT CALL THIS FUNCTION DIRECTLY.
  # Use SuperPCA_pVals() instead
  
## Not run: 
  data("colon_pathwayCollection")
  data("colonSurv_df")
  
  colon_OmicsSurv <- CreateOmics(
    assayData_df = colonSurv_df[,-(2:3)],
    pathwayCollection_ls = colon_pathwayCollection,
    response = colonSurv_df[, 1:3],
    respType = "surv"
  )
  
  asthmaGenes_char <-
    getTrimPathwayCollection(colon_OmicsSurv)[["KEGG_ASTHMA"]]$IDs
    
  data_ls <- list(
    x = t(getAssay(colon_OmicsSurv))[asthmaGenes_char, ],
    y = getEventTime(colon_OmicsSurv),
    censoring.status = getEvent(colon_OmicsSurv),
    featurenames = asthmaGenes_char
  )
  
  superpcFit <- superpc.train(
    data = data_ls,
    type = "surv"
  )
  
  superpc.st(
    fit = superpcFit,
    data = data_ls
  )

## End(Not run) 
  

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