Description Usage Arguments Value Examples
Fit spike and slab Cox PHMs
1 | wu.fit(Y, delta, X)
|
Y |
survival times |
delta |
censoring indicator, 0: uncensored, 1: censored |
X |
design matrix |
list with coefficient values and number of non-zero coefficients
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | # Generate data
set.seed(1)
n <- 250; omega <- 1; censoring_lvl <- 0.4
b <- c(1, 1, rep(0, 250))
p <- length(b)
X <- matrix(rnorm(n * p), nrow=n)
y <- runif(nrow(X))
Y <- log(1 - y) / - (exp(X %*% b) * omega)
delta <- runif(n) > censoring_lvl # 0: censored, 1: uncensored
Y[!delta] <- Y[!delta] * runif(sum(!delta))
fit <- wu.fit(Y, delta, X)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.