imp_orderedcat_single: The function to impute ordered categorical variables

Description Usage Arguments Value

View source: R/hmi_imp_catordered_single.R

Description

The function uses the proportional odds logistic regression (polr) approach, implemented in mice.

Usage

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

Arguments

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.

Value

A n x 1 data.frame with the original and imputed values as a factor.


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