RandomControlSample {pathwayPCA} | R Documentation

## Parametric bootstrap and non-parametric permutations of a response vector or matrix

### Description

Create a random parametric bootstrap sample or a permutation of the input response vector or matrix (for survival outcomes).

### Usage

    SampleResponses(
      response_vec,
      event_vec = NULL,
      respType = c("survival", "regression", "categorical"),
      parametric = TRUE
    )

    SampleSurv(response_vec, event_vec, parametric = TRUE)

    SampleReg(response_vec, parametric = TRUE)

    SampleCateg(response_vec, parametric = TRUE)

### Arguments

`response_vec` | The dependent vector to sample from. For survival response, this is the vector of event times. For regression or n-ary classification, this is the vector of responses.
`event_vec` | The death / event observation indicator vector for survival response. This is coded as 0 for a right-censoring occurence and 1 for a recorded event.
`respType` | What type of response has been supplied. Options are `"none"`, `"survival"`, `"regression"`, and `"categorical"`. Defaults to `"none"` to match the default `response = NULL` value.
`parametric` | Should the random sample be taken using a parametric bootstrap sample? Defaults to `TRUE`.

### Details

The distributions (for `parametric = TRUE`) are Weibull for survival times, Normal for regression response, and n-ary Multinomial for categorical response. Distributional parameters are estimated with their maximum likelihood estimates. When `parametric = FALSE`, the response vector or survival matrix is randomly ordered by row. This option should only be used when called from the AES-PCA method.

### Value

If `parametric = FALSE`, a permutation of the supplied response is returned (for AES-PCA). If `parametric = TRUE`, we return a parametric bootstrap sample of the response.

### Examples

      # DO NOT CALL THESE FUNCTIONS DIRECTLY.
      # Use AESPCA_pVals() or SuperPCA_pVals() instead

    ## Not run:
      data("colon_pathwayCollection")
      data("colonSurv_df")

      SampleResponses(
        response_vec = colonSurv_df$OS_time,
        event_vec = colonSurv_df$OS_event,
        respType = "survival"
      )

    ## End(Not run)

[Package pathwayPCA version 1.10.0 Index]