Description Usage Arguments Value
View source: R/hmi_imp_interval.R
This functions imputes interval data variables. Those are variables,
that consists of a lower and upper (numeric) boundary. Technically
those boundaries are contained in a string, separated by a semi colon.
E.g. if a person reports there income to be something between 3000 and 4000 dollars,
its value in the interval covariate would be "3000;4000"
.
Left (resp. right) censored data can be denoted by "-Inf;x"
(resp. "x;Inf"
),
with x
being the (numeric) observed value.
1 | imp_interval(y_imp, X_imp, pvalue = 0.2, k = Inf)
|
y_imp |
A Vector from the class |
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.
Note that this function won't return interval
data as its purpose is to
"break" the interval answers into precise answers.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.