Description Usage Arguments Author(s) References See Also Examples
coxre
fits a Cox proportional hazards model to event history
data using a gamma distribution random effect. The parameter, gamma,
is the variance of this mixing distribution.
If a matrix of response times is supplied, the model can be stratified by columns, i.e. a different intensity function is fitted for each column. To fit identical intensity functions to all response types, give the times as a vector.
1 2 3 4 |
response |
Vector or matrix of times to events, with one column per type of response (or subunit). |
censor |
Corresponding vector or matrix of censoring indicators. If NULL all values are set to one. |
nest |
Vector indicating to which unit each observation belongs. |
cov |
One covariate |
stratified |
If TRUE, a model stratified on type of response (the columns of response) is fitted instead of proportional intensities. |
cumul |
Set to TRUE if response times are from a common origin instead of times to (or between) events. |
estimate |
Initial estimate of the frailty parameter. |
iter |
Maximum number of iterations allowed for the inner EM loop. |
print.level |
|
ndigit |
|
gradtol |
|
steptol |
|
iterlim |
|
fscale |
|
typsize |
|
stepmax |
|
D.G. Clayton and J.K. Lindsey
Clayton, D. (1987) The analysis of event history data: a review of progress and outstanding problems. Statistics in Medicine 7: 819-841
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 | # 11 individuals, each with 5 responses
y <- matrix(c(51,36,50,35,42,
27,20,26,17,27,
37,22,41,37,30,
42,36,32,34,27,
27,18,33,14,29,
43,32,43,35,40,
41,22,36,25,38,
38,21,31,20,16,
36,23,27,25,28,
26,31,31,32,36,
29,20,25,26,25),ncol=5,byrow=TRUE)
# Different intensity functions
coxre(response=y, censor=matrix(rep(1,55),ncol=5), nest=1:11,
est=0.7, stratified=TRUE)
# Proportional intensity functions for the five responses
coxre(response=y, censor=matrix(rep(1,55),ncol=5), nest=1:11,
est=0.7, stratified=FALSE)
# Identical intensity functions
coxre(response=as.vector(t(y)), censor=rep(1,55),
nest=rep(1:11,rep(5,11)), est=0.7)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.