fastcmprsk (version 1.1.1)

varianceControl: Controls for Variance Calculation

Description

Controls for variance calculation for the fastcmprsk package.

Usage

varianceControl(B = 100L, seed = 1991L, useMultipleCores = FALSE)

Arguments

B

Integer: Number of bootstrap samples needed for variance estimation.

seed

Integer: Seed value for bootstrapping. Results may differ if parallelized.

useMultipleCores

Logical: Set to TRUE if parallelizing. (Default is FALSE).

Value

Returns a list for variance options inputted into fastCrr.

B

same as what is defined in function.

seed

same as what is defined in function.

useMultipleCores

same as what is defined in function.

Details

Variance-covariance estimation is done via bootstrap. Independent bootstrap runs can be performed both in serial and parallel. Parallelization is done via the doParallel package.

Examples

Run this code
# 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')
vc <- varianceControl(B = 100, seed = 2019, useMultipleCores = FALSE)
fit1 <- fastCrr(Crisk(ftime, fstatus) ~ cov, variance = TRUE, var.control = vc)
fit1$var # Estimated covariance matrix via bootstrap

# }

Run the code above in your browser using DataLab