coxTrain_fun: Train Cox Proportional Hazards model for supervised PCA

Description Usage Arguments Details Value Examples

View source: R/superPC_model_CoxPH.R

Description

Main and utility functions for training the Cox PH model.

Usage

1
coxTrain_fun(x, y, censoring.status, s0.perc = NULL)

Arguments

x

A "tall" pathway data frame (p \times n).

y

A response vector of follow-up / event times.

censoring.status

A censoring vector.

s0.perc

A stabilization parameter. This is an optional argument to each of the functions called internally. Defaults to NULL.

Details

See https://web.stanford.edu/~hastie/Papers/spca_JASA.pdf, Section 5, for a description of Supervised PCA applied to survival data. The internal utility functions defined in this file (.coxscor, .coxvar, and .coxstuff) are not called anywhere else, other than in the coxTrain_fun function itself. Therefore, we do not document these functions.

NOTE: No missing values allowed.

Value

A list containing:

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
  # DO NOT CALL THIS FUNCTION DIRECTLY.
  # Use SuperPCA_pVals() instead
  
## Not run: 
  p <- 500
  n <- 50

  x_mat <- matrix(rnorm(n * p), nrow = p, ncol = n)
  x_df <- data.frame(x_mat)
  time_int <- rpois(n, lambda = 365 * 2)
  obs_logi <- sample(
    c(FALSE, TRUE),
    size = n,
    replace = TRUE,
    prob = c(0.2, 0.8)
  )

  coxTrain_fun(
    x = x_df,
    y = time_int,
    censoring.status = !obs_logi
  )

## End(Not run)
  

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