If multiple imputation was used due to the presence of missing data, pool SPVIM estimates from individual imputed datasets using Rubin's rules. Results in point estimates averaged over the imputations, along with within-imputation variance estimates and across-imputation variance estimates; and test statistics and p-values for hypothesis testing.
pool_spvims(spvim_ests = NULL)
a list of estimated SPVIMs (of class vim
)
a list of results containing the following:
est
, the average SPVIM estimate over the multiply-imputed datasets
se
, the average of the within-imputation SPVIM variance estimates
test_statistics
, the test statistics for hypothesis tests of zero importance, using the Rubin's rules standard error estimator and average SPVIM estimate
p_values
, p-values computed using the above test statistics
tau_n
, the across-imputation variance estimates
vcov
, the overall variance-covariance matrix
# \donttest{
data("biomarkers")
library("dplyr")
# do multiple imputation (with a small number for illustration only)
library("mice")
n_imp <- 2
set.seed(20231129)
mi_biomarkers <- mice::mice(data = biomarkers, m = n_imp, printFlag = FALSE)
imputed_biomarkers <- mice::complete(mi_biomarkers, action = "long") %>%
rename(imp = .imp, id = .id)
# estimate SPVIMs for each imputed dataset, using simple library for illustration only
library("SuperLearner")
est_lst <- lapply(as.list(1:n_imp), function(l) {
this_x <- imputed_biomarkers %>%
filter(imp == l) %>%
select(starts_with("lab"), starts_with("cea"))
this_y <- biomarkers$mucinous
suppressWarnings(
vimp::sp_vim(Y = this_y, X = this_x, V = 2, type = "auc",
SL.library = "SL.glm", gamma = 0.1, alpha = 0.05, delta = 0,
cvControl = list(V = 2), env = environment())
)
})
# pool the SPVIMs using Rubin's rules
pooled_spvims <- pool_spvims(spvim_ests = est_lst)
pooled_spvims
#> $est
#> [1] 0.0203970509 0.0000000000 0.0042748918 0.0133759470 0.0198035038
#> [6] 0.0017647059 0.0013764881 0.0462493236 0.0023741883 0.0229903154
#> [11] 0.0000000000 0.0338557923 0.0000000000 0.0490056818 0.0146788715
#> [16] 0.0005580357 0.0000000000 0.0000000000 0.0371533613 0.0000000000
#> [21] 0.0000000000
#>
#> $se
#> [1] 0.11353566 0.08940490 0.08749575 0.11328079 0.11465702 0.09379665
#> [7] 0.11285666 0.11450994 0.09971893 0.09504155 0.09308949 0.11771338
#> [13] 0.09396874 0.10031829 0.09303687 0.08924080 0.09396874 0.09792115
#> [19] 0.10363918 0.09208330 0.09396874
#>
#> $test_statistics
#> [1] 1.383681e-01 -1.333979e-15 3.455815e-02 9.238865e-02 1.337755e-01
#> [6] 1.378052e-02 9.652968e-03 2.808346e-01 1.792033e-02 1.753326e-01
#> [11] -1.306100e-15 2.146093e-01 -1.299543e-15 3.108098e-01 1.129345e-01
#> [16] 4.474095e-03 -1.299543e-15 -1.270535e-15 2.478329e-01 -1.313650e-15
#> [21] -1.299543e-15
#>
#> $p_values
#> [1] 0.4449748 0.5000000 0.4862160 0.4631946 0.4467901 0.4945025 0.4961491
#> [8] 0.3894186 0.4928512 0.4304092 0.5000000 0.4150360 0.5000000 0.3779726
#> [15] 0.4550412 0.4982151 0.5000000 0.5000000 0.4021319 0.5000000 0.5000000
#>
#> $tau_n
#> [1] 8.320794e-04 0.000000e+00 3.654940e-05 3.578319e-04 7.843575e-04
#> [6] 6.228374e-06 3.789439e-06 4.278000e-03 1.127354e-05 3.792748e-04
#> [11] 0.000000e+00 2.292429e-03 0.000000e+00 4.803114e-03 4.309385e-04
#> [16] 6.228077e-07 0.000000e+00 0.000000e+00 2.760745e-03 0.000000e+00
#> [21] 0.000000e+00
#>
#> $vcov
#> [,1] [,2] [,3] [,4] [,5] [,6]
#> [1,] 122.45122120 -0.69865615 0.22274749 -1.6440215 88.089968 -44.0993930
#> [2,] -0.69990427 9.43656299 0.05378035 -26.5393849 7.977399 0.2017249
#> [3,] 0.22155420 0.05383518 1.47957063 -0.4703462 -0.335811 0.5154016
#> [4,] -1.64473291 -26.53884811 -0.46986425 123.2893327 -26.030022 0.8487708
#> [5,] 88.08989685 7.97857546 -0.33468930 -26.0293825 128.492542 -43.9094308
#> [6,] -44.10063179 0.20173425 0.51535614 0.8482434 -43.910598 27.8783319
#> [7,] -1.14589115 -26.60957244 -0.31694276 92.0584174 -27.983490 -0.2702137
#> [8,] 86.08500229 8.39381328 -0.81754064 -27.0495483 96.596419 -55.1586225
#> [9,] 44.61541795 8.45043253 -0.13394914 -25.9076107 57.997966 -21.7168277
#> [10,] 0.54310755 -9.89316539 0.29333637 25.0385916 -10.371483 0.2514027
#> [11,] 24.22918567 -0.13938769 -0.30797359 -0.3100409 21.000945 -11.5885333
#> [12,] -43.95890542 -29.49199410 1.03587664 88.7512764 -73.604326 26.7446246
#> [13,] -43.44558318 8.82167944 -0.20140282 -27.1604607 -34.299299 18.8353410
#> [14,] 41.54027721 8.68912779 -0.02305108 -27.5496573 54.369759 -21.2146523
#> [15,] -43.10154957 -0.11598532 -0.23917004 -1.9856039 -43.236964 18.7425146
#> [16,] 0.05096021 8.69556220 0.08667839 -26.6984639 8.588406 0.2459798
#> [17,] -43.44558318 8.82167944 -0.20140282 -27.1604607 -34.299299 18.8353410
#> [18,] 33.56196791 7.87069579 -0.47960159 -24.3642684 45.613744 -18.0595366
#> [19,] -43.19878209 -17.82771011 0.51863270 41.8566185 -60.948689 17.9125249
#> [20,] -43.07043543 0.01856178 -0.01666683 -0.2916259 -43.102417 18.8396273
#> [21,] -43.44558318 8.82167944 -0.20140282 -27.1604607 -34.299299 18.8353410
#> [,7] [,8] [,9] [,10] [,11] [,12]
#> [1,] -1.1446487 86.0798334 44.6166492 0.5437868 24.2304338 -43.961096
#> [2,] -26.6095781 8.3873963 8.4504156 -9.8937343 -0.1393877 -29.495433
#> [3,] -0.3168936 -0.8239028 -0.1339112 0.2928223 -0.3079188 1.032493
#> [4,] 92.0589485 -27.0554286 -25.9070909 25.0385594 -0.3095041 88.748374
#> [5,] -27.9823191 96.5911783 57.9991255 -10.3708754 21.0021214 -73.606588
#> [6,] -0.2702100 -55.1650301 -21.7168353 0.2508431 -11.5885240 26.741195
#> [7,] 121.0578289 -28.3022074 -27.9189282 18.6068096 -0.2479214 86.580060
#> [8,] -28.2957961 127.7190469 51.0852265 -10.3434353 25.6247531 -84.855780
#> [9,] -27.9189170 51.0788264 54.5039305 -10.6239217 9.5624014 -51.413985
#> [10,] 18.6073728 -10.3492834 -10.6233697 33.9270345 0.4976432 32.882674
#> [11,] -0.2479271 25.6183361 9.5623845 0.4970743 24.8426743 -11.858707
#> [12,] 86.5834934 -84.8587585 -51.4105637 32.8855436 -11.8552686 146.918502
#> [13,] -26.6310476 -28.8755285 -13.3786588 -9.9862742 -12.9135248 -10.861817
#> [14,] -28.4845561 50.9766488 28.3979052 -10.0509368 13.8842613 -50.911810
#> [15,] -1.3067139 -37.8131933 -22.3163235 0.4963454 -12.6216186 19.483417
#> [16,] -26.7756487 8.1460710 8.6174685 -10.0943311 -0.4938400 -29.451178
#> [17,] -26.6310476 -28.8755285 -13.3786588 -9.9862742 -12.9135248 -10.861817
#> [18,] -25.9502546 42.5553219 22.4450086 -10.5967205 7.3405483 -47.756694
#> [19,] 42.8927146 -55.5249181 -40.0280483 22.6031314 -12.8279577 90.096990
#> [20,] -0.1833733 -37.6786462 -22.1817764 0.4885166 -12.7019269 19.037714
#> [21,] -26.6310476 -28.8755285 -13.3786588 -9.9862742 -12.9135248 -10.861817
#> [,13] [,14] [,15] [,16] [,17] [,18]
#> [1,] -43.444335 41.53432066 -43.1009479 0.05220739 -43.444335 33.5632160
#> [2,] 8.821679 8.68192311 -0.1166317 8.69556127 8.821679 7.8706958
#> [3,] -0.201348 -0.03020093 -0.2397616 0.08673228 -0.201348 -0.4795468
#> [4,] -27.159924 -27.55632522 -1.9857135 -26.69792809 -27.159924 -24.3637317
#> [5,] -34.298123 54.36373132 -43.2364339 8.58958185 -34.298123 45.6149209
#> [6,] 18.835350 -21.22184762 18.7418775 0.24598825 18.835350 -18.0595273
#> [7,] -26.631042 -28.49175506 -1.3073546 -26.77564393 -26.631042 -25.9502489
#> [8,] -28.869112 50.97586109 -37.8074227 8.15248710 -28.869112 42.5617389
#> [9,] -13.378642 28.39071743 -22.3169530 8.61748450 -13.378642 22.4450255
#> [10,] -9.985705 -10.05757255 0.4962680 -10.09376312 -9.985705 -10.5961516
#> [11,] -12.913525 13.87705663 -12.6222650 -0.49384091 -12.913525 7.3405483
#> [12,] -10.858378 -50.91557598 19.4862090 -29.44774010 -10.858378 -47.7532557
#> [13,] 28.772013 -13.80894625 19.8337023 8.64100807 28.772013 -8.5868626
#> [14,] -13.801742 57.28116357 -22.7400527 8.60987560 -13.801742 23.5830576
#> [15,] 19.834349 -22.74661101 24.6916095 -0.29665669 19.834349 -17.5245274
#> [16,] 8.641009 8.60267186 -0.2973022 8.75925193 8.641009 8.4934295
#> [17,] 28.772013 -13.80894625 19.8337023 8.64100807 28.772013 -8.5868626
#> [18,] -8.586863 23.57585289 -17.5251738 8.49342859 -8.586863 46.2947595
#> [19,] 2.122624 -40.45833580 21.2038367 -18.00838148 2.122624 -35.2362522
#> [20,] 19.968896 -22.61206392 20.4096621 -0.16210959 19.968896 -17.3899803
#> [21,] 28.772013 -13.80894625 19.8337023 8.64100807 28.772013 -8.5868626
#> [,19] [,20] [,21]
#> [1,] -43.2016751 -43.06918731 -43.444335
#> [2,] -17.8318512 0.01856178 8.821679
#> [3,] 0.5145464 -0.01661201 -0.201348
#> [4,] 41.8530141 -0.29108913 -27.159924
#> [5,] -60.9516534 -43.10124041 -34.298123
#> [6,] 17.9083931 18.83963663 18.835350
#> [7,] 42.8885791 -0.18336763 -26.631042
#> [8,] -55.5226422 -37.67222918 -28.869112
#> [9,] -40.0321725 -22.18175953 -13.378642
#> [10,] 22.5995592 0.48908548 -9.985705
#> [11,] -12.8320989 -12.70192691 -12.913525
#> [12,] 90.0962876 19.04115223 -10.858378
#> [13,] 2.1184828 19.96889583 28.772013
#> [14,] -40.4552722 -22.60485925 -13.801742
#> [15,] 21.2003420 20.41030850 19.834349
#> [16,] -18.0125217 -0.16210866 8.641009
#> [17,] 2.1184828 19.96889583 28.772013
#> [18,] -35.2403933 -17.38998030 -8.586863
#> [19,] 73.7476236 20.46703201 2.122624
#> [20,] 20.4628909 20.51643939 19.968896
#> [21,] 2.1184828 19.96889583 28.772013
#>
# }