thetaEst | R Documentation |
A method to estimate the baseline survival rate for each time interval and the covariate nuisance parameters for a grouped survival model. The estimation is conducted under the null hypothesis, i.e., that there is no effect from the variable of interest.
thetaEst(Z=NULL, gtime, delta, method="BFGS")
Z |
Optional |
gtime |
Vector of observed survival times for each sample. |
delta |
Vector of event indicators for each sample: 1 indicates observed event, 0 indicates censored. |
method |
String indicating optimization method, passed to |
A list containing two vectors: alpha
, the baseline survival rate for each time interval, and theta
, the estimated nuisance parameters of the covariates.
# Generate dummy data
cov1 <- c(1, 2, 2, 2, 1, 1, 0, 1, 1)
cov2 <- c(2, 2, 1, 0, 1, 0, 1, 1, 0.5)
Z <- cbind(cov1, cov2)
gtime <- c(1, 3, 3, 2, 1, 1, 2, 3, 1)
delta <- c(1, 0, 1, 1, 1, 0, 1, 0, 1)
#res <- thetaEst(Z, gtime, delta)
#res
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.