genCPHM: Generation of survival data from a Cox Proportional Hazard...

Description Usage Arguments Value Author(s) References See Also Examples

Description

Generation of survival data from a Cox Proportional Hazard Model.

Usage

1
genCPHM(n, model.cens, cens.par, beta, covar)

Arguments

n

Sample size.

model.cens

Model for censorship. Possible values are "uniform" and "exponential".

cens.par

Parameter for the censorship distribution. Must be greater than 0.

beta

Regression parameter for the time-fixed covariate.

covar

Parameter for generating the time-fixed covariate. An uniform distribution is used.

Value

An object with two classes, data.frame and CPHM.

Author(s)

Artur Araújo, Luís Meira Machado and Susana Faria

References

Cox, D.R. (1972). Regression models and life tables (with discussion). Journal of the Royal Statistical Society, Series B 34:187-220.

See Also

genCMM, genTDCM, genTHMM.

Examples

1
2
3
4
5
cphmdata <- genCPHM(n=1000, model.cens="exponential", cens.par=2, beta= 2, covar=1)
head(cphmdata, n=20L)
library(survival)
fit<-coxph(Surv(time,status)~covariate,data=cphmdata)
summary(fit)


Search within the genSurv package
Search all R packages, documentation and source code

Questions? Problems? Suggestions? or email at ian@mutexlabs.com.

Please suggest features or report bugs with the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.