Description Usage Arguments Details Value Examples
View source: R/varianceControl.R
Controls for variance calculation for the fastcmprsk package.
1 | varianceControl(B = 100L, seed = 1991L, useMultipleCores = FALSE)
|
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). |
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.
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. |
1 2 3 4 5 6 7 8 9 | 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
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.