imp_interval: The function to impute interval data variables

Description Usage Arguments Value

View source: R/hmi_imp_interval.R

Description

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.

Usage

1
imp_interval(y_imp, X_imp, pvalue = 0.2, k = Inf)

Arguments

y_imp

A Vector from the class interval 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.

Value

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.


hmi documentation built on Oct. 23, 2020, 7:31 p.m.