varianceControl {fastcmprsk} | R Documentation |
Controls for Variance Calculation
Description
Controls for variance calculation for the fastcmprsk package.
Usage
varianceControl(
B = 100L,
seed = 1991L,
useMultipleCores = FALSE,
extractMatrix = 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). |
extractMatrix |
Logical: Extract matrix of bootstrap estimates (Default is FALSE) |
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.
Value
Returns a list for variance options inputted into fastCrr
.
B |
same as what is defined in argument. |
seed |
same as what is defined in argument. |
mcores |
same as what is defined in argument |
extract |
same as what is defined in argument |
Examples
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
[Package fastcmprsk version 1.24.5 Index]