Description Usage Arguments Details Value Examples
View source: R/superPC_model_CoxPH.R
Main and utility functions for training the Cox PH model.
1 | 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 |
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.
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)
.
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)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.