Closed edbonneville closed 1 year ago
Is a useful extension, but please implement in a slightly different way:
ranger()
function produces a warning for any argument name that is not in its argument list. It does not have a silent option, so also other names produce warnings.fit <- suppressWarnings(ranger::ranger(x = xobs, y = yobs, num.trees = ntree, ...))
instead. This style is also used in various places in mice.impute.xxx()
functions (though it has some downsides).type
model as this it used in various 2l
functions.blots
facility (from "block-dots"), which allows you to specify dots argument for each block (this doesn't however solve the type
warning).Looking forward to your tweak.
It has now been edited.. thank you also for mentioning the blots
facility, which I was not yet aware of (and is indeed neater!).
Hi! This PR allows to pass
...
arguments toranger::ranger()
when usingmice.impute.rf()
....
was only being passed along whenrfPackage = "randomForest"
; should want the same behaviour with the now defaultrfPackage = "ranger"
.fit
toranger::ranger(x = xobs, y = yobs, num.trees = ntree, ...)
, but this triggers unused arguments warning for "type" (which I think is passed along to allmice.impute.method
functions?). Hence, I uselist(...)
, setextra_ranger_args[["type"]] <- NULL
, and proceed withdo.call()
to avoid this warning.ranger()
arguments (e.g.mtry
) can affect the quality of the imputations quite a bit.