superpc.train {pathwayPCA} | R Documentation

## Train a supervised PCA model

### Description

Computes feature scores for p_{path} features of a pathway via a linear model fit.

### Usage

    superpc.train(
      data,
      type = c("survival", "regression", "categorical"),
      s0.perc = NULL
    )

### Arguments

`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`.
`type` | What model relates `y` and `x`? Options are `"survival"`, `"regression"`, or `"categorical"`.
`s0.perc` | A stabilization parameter on the interval [0,1]. This is an internal argument to each of the called functions. The default value is `NULL` to ensure an appropriate value is determined internally.

### Details

This function is a `switch` call to `coxTrain_fun` (for `type = "survival"`), `olsTrain_fun` (for `type = "regression"`), or `glmTrain_fun` (for `type = "categorical"`).

### Value

A list containing:

- `feature.scores` : The scaled p-dimensional score vector: each value has been divided by its respective standard deviation plus epsilon (governed by `s0.perc`). `NA` values returned by the logistic model are replaced with 0.

- `type` : The argument for `type`.

- `s0.perc` : The user-supplied value of `s0.perc`, or the internally-calculated default value from the chosen model.

- `call` : The output of `match.call` for the user- supplied function arguments.

### See Also

`superpc.st`; `SuperPCA_pVals`

### Examples

      # 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
      )

      superpc.train(
        data = data_ls,
        type = "surv"
      )

    ## End(Not run)

[Package pathwayPCA version 1.10.0 Index]