Description Usage Arguments Value Examples
This function estimates beta in a stratified Cox proportional hazard model. You can also set facility to be the same and model an unstratified Cox model with this function. Note: facility must be integer 1, or a successive vector of integer from 1 to num_facility (number of facilities). String, float, or any other types of facility must be converted to successive integers first. Missingness is not accepted, and the observations must be ordered by time. Ties might affect the correctness.
1 | CoxC(delta, z, facility, num_facility, tol)
|
delta |
indicator vector of event |
z |
design matrix |
facility |
which facility each patient belongs to |
num_facility |
number of facilities (strata) |
tol |
tolerance of precision, when highest change in beta is lower than or equal to tol, iteration stops |
estimated beta
1 2 3 | set.seed(2019)
testdata = generate_data()
CoxC(testdata$delta, testdata$z, testdata$facility, testdata$num_facility, tol= 1.0e-6)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.