# NOT RUN {
library(fastcmprsk)
set.seed(10)
ftime <- rexp(200)
fstatus <- sample(0:2, 200, replace = TRUE)
cov <- matrix(runif(1000), nrow = 200)
dimnames(cov)[[2]] <- c('x1','x2','x3','x4','x5')
fit <- fastCrr(Crisk(ftime, fstatus) ~ cov, variance = FALSE)
# Not run: How to set up multiple cores for boostrapping
# library(doParallel) # make sure necessary packages are loaded
# myClust <- makeCluster(2)
# registerDoParallel(myClust)
# fit1 <- fastCrr(Crisk(ftime, fstatus) ~ cov, variance = TRUE,
# var.control = varianceControl(B = 100, useMultipleCores = TRUE))
# stopCluster(myClust)
# }
Run the code above in your browser using DataLab