show_var {mixgb} | R Documentation |
Show m sets of imputed values for a specified variable.
show_var(imputation.list, var.name, original.data, true.values = NULL)
imputation.list |
A list of |
var.name |
The name of a variable of interest. |
original.data |
The original data with missing data. |
true.values |
A vector of the true values (if known) of the missing values. In general, this is unknown ( |
A data.table with m
columns, each of which represents a set of imputed values for the variable of interest. If true.values
is provided, an additional column will display the true values of the missing values.
# obtain m multiply datasets
params <- list(max_depth = 3, subsample = 1, nthread = 2)
mixgb.data <- mixgb(data = nhanes3, m = 3, xgb.params = params, nrounds = 20)
imputed.BMPHEAD <- show_var(
imputation.list = mixgb.data, var.name = "BMPHEAD",
original.data = nhanes3
)
imputed.BMPHEAD