View source: R/impute_in_classes.R
| impute_hot_deck_in_classes | R Documentation | 
Impute missing values in a data frame or a matrix using a hot deck within imputation classes
impute_hot_deck_in_classes( ds, cols_class, type = "cols_seq", breaks = Inf, use_quantiles = FALSE, min_objs_in_class = 1, min_obs_comp = 0, min_obs_per_col = 1, donor_limit = Inf, add_imputation_classes = FALSE )
| ds | A data frame or matrix with missing values. | 
| cols_class | Columns that are used for constructing the imputation classes. | 
| type | The type of hot deck (for details, see  | 
| breaks | Number of intervals / levels a column is broken into (see
 | 
| use_quantiles | Should quantiles be used for cutting numeric vectors?
Normally,  | 
| min_objs_in_class | Minimum number of objects (rows) in an imputation class. | 
| min_obs_comp | Minimum number of completely observed objects (rows) in an imputation class. | 
| min_obs_per_col | Minimum number of observed values in every column of an imputation class. | 
| donor_limit | Minimum odds between incomplete and complete values in a
column, if  | 
| add_imputation_classes | Should imputation classes be added as attributes to the imputed dataset? | 
This function is a combination of impute_in_classes() and impute_sRHD().
It applies impute_sRHD() inside of imputation classes (adjustment cells),
which are constructed via impute_in_classes(). More details can be found in
these two functions.
An object of the same class as ds with imputed missing values.
Andridge, R.R. and Little, R.J.A. (2010), A Review of Hot Deck Imputation for Survey Non-response. International Statistical Review, 78: 40-64. doi:10.1111/j.1751-5823.2010.00103.x
impute_in_classes(), which is used for the construction of the imputation
classes.
impute_sRHD(), which is used for the imputation.
impute_hot_deck_in_classes(data.frame(
  X = c(rep("A", 10), rep("B", 10)),
  Y = c(rep(NA, 5), 106:120)
),
"X",
donor_limit = 1
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.