crrRx | R Documentation |
Wrapper function to fit fine and gray competing risk model using function crr from package cmprsk
crrRx(f, data)
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 |
a competing risk model with the call appended to the list
cmprsk::crr
# 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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.