Description Usage Arguments Value
View source: R/hmi_imp_cat_single.R
The function uses regression trees for imputation implemented in mice
.
The principle is the following:
For each observation it is calculated at which leave it would end.
Then one (randomly selected) observation of the other observations found on this leave
functions as a donor.
1 | imp_cat_single(y_imp, X_imp, pvalue = 0.2, k = Inf)
|
y_imp |
A Vector with the variable to impute. |
X_imp |
A data.frame with the fixed effects variables. |
pvalue |
A numeric between 0 and 1 denoting the threshold of p-values a variable in the imputation model should not exceed. If they do, they are excluded from the imputation model. |
k |
An integer defining the allowed maximum of levels in a factor covariate. |
A n x 1 data.frame with the original and imputed values.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.