coxTrain_fun.Rd
Main and utility functions for training the Cox PH model.
coxTrain_fun(x, y, censoring.status, s0.perc = NULL)
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 |
A list containing:
tt
: The scaled p-dimensional score vector: each value has
been divided by the respective standard deviation plus the fudge
value.
numer
: The original p-dimensional score vector. From the
internal .coxscor
function.
sd
: The standard deviations of the scores. From the
internal .coxvar
function.
fudge
: A regularization scalar added to the standard
deviation. If s0.perc
is supplied,
fudge = quantile(sd, s0.perc)
.
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.
# DO NOT CALL THIS FUNCTION DIRECTLY. # Use SuperPCA_pVals() instead if (FALSE) { 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 ) }