setRFoptions: Set Random Forest options for imputation using MICE

Description Usage Arguments Details Value See Also Examples

View source: R/setRFoptions.R

Description

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

Usage

1
2
3
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_'.

Value

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

See Also

mice.impute.rfcat, mice.impute.rfcont

Examples

1
2
3
4
5
6
7
# Set option using setRFoptions
setRFoptions(ntree_cat=15)
options()$CALIBERrfimpute_ntree_cat

# Set option directly
options(CALIBERrfimpute_ntree_cat=20)
options()$CALIBERrfimpute_ntree_cat

CALIBERrfimpute documentation built on June 12, 2018, 3 a.m.