Closed Sim19 closed 3 years ago
Hi Simon,
I believe that the desired warning is communicated when relevant - i.e. when n.core
is specified, but n.imp.core
is not. See the below output for imp
.
library(mice)
imp <- parlmice(nhanes, m = 5, n.core = 2)
#> Warning in parlmice(nhanes, m = 5, n.core = 2): Number of imputations per core
#> not specified: n.imp.core = m = 5 has been used
imp$m
#> [1] 10
imp1 <- parlmice(nhanes, n.imp.core = 3, n.core = 2)
imp1$m
#> [1] 6
imp2 <- parlmice(nhanes, m = 5)
imp2$m
#> [1] 5
Created on 2021-03-22 by the reprex package (v1.0.0)
For imp1
and imp2
there is no warning printed, as the algorithm either falls back to the default, or the argument n.imp.core
is specified.
This is intentional and desired behaviour.
All the best,
Gerko
By the way; the default is n.core <- parallel::detectCores() - 1
. This is also the fallback when n.imp.core
is specified, but n.core
is not.
Hi,
Could it be that when imputing with
mice::parlmice()
withm
andn.core
, one getsm * n.cores
imputations? If that's so, a warning would be great in the help-file.Thanks a lot for the great package!