crrRx {reportRmd} | R Documentation |
fit crr model
Description
Wrapper function to fit fine and gray competing risk model using function crr from package cmprsk
Usage
crrRx(f, data)
Arguments
f |
formula for the model. Currently the formula only works by using the name of the column in a dataframe. It does not work by using $ or [] notation. |
data |
dataframe containing data |
Value
a competing risk model with the call appended to the list
See Also
Examples
# From the crr help file:
set.seed(10)
ftime <- rexp(200)
fstatus <- sample(0:2,200,replace=TRUE)
cov <- matrix(runif(600),nrow=200)
dimnames(cov)[[2]] <- c('x1','x2','x3')
df <- data.frame(ftime,fstatus,cov)
m1 <- crrRx(as.formula('ftime+fstatus~x1+x2+x3'),df)
# Nicely output to report:
rm_mvsum(m1,data=df,showN = TRUE,vif=TRUE)
[Package reportRmd version 0.1.0 Index]