setRFoptions function

Set Random Forest options for imputation using MICE

Set Random Forest options for imputation using MICE

A convenience function to set global options for number of trees or number of nodes.

setRFoptions(ntree_cat = NULL, ntree_cont = NULL, nodesize_cat = NULL, nodesize_cont = NULL, maxnodes_cat = NULL, maxnodes_cont = NULL)

Arguments

  • ntree_cat: number of trees to be used for imputing categorical variables (each imputed value is the prediction of a randomly chosen tree), default = 10.
  • ntree_cont: number of trees in the forest for imputing continuous variables, default = 10.
  • nodesize_cat: minimum node size for trees for imputing categorical variables, default = 1. A higher value can be used on larger datasets in order to save time.
  • nodesize_cont: minimum node size for trees for imputing continuous variables, default = 5. A higher value can be used on larger datasets in order to save time.
  • maxnodes_cat: maximum number of nodes in trees for imputing categorical variables. By default the size limit is set by the number of observations and nodesize_cat.
  • maxnodes_cont: maximum number of nodes in trees for imputing continuous variables. By default the size limit is set by the number of observations and nodesize_cont.

Details

This function sets the global options which have the prefix 'CALIBERrfimpute_'.

Returns

No return value. The function prints a message stating the new option setting.

See Also

mice.impute.rfcat, mice.impute.rfcont

Examples

# Set option using setRFoptions setRFoptions(ntree_cat=15) options()$CALIBERrfimpute_ntree_cat # Set option directly options(CALIBERrfimpute_ntree_cat=20) options()$CALIBERrfimpute_ntree_cat
  • Maintainer: Anoop Shah
  • License: GPL-3
  • Last published: 2022-12-04

Useful links