| gen_data | R Documentation | 
Generates data set from the proportional hazards regression model without or with contamination.
gen_data(n, beta, cont = 0, p.censor = 0)
| n | number of observations. | 
| beta | vector of regression coefficients. | 
| cont | fraction of contaminated observations. | 
| p.censor | probability of censoring. | 
Data frame containing the following variables:
timevector of survival times.
statusvector of censoring status.
X1, X2, ...explanatory variables (their number is determined by the dimension of vector of regression coefficients).
if (interactive()) {
gen_data(50, c(2,-2), cont = 0.05)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.