Determine the number of unique values in a variable. To be used in mfp2().
Usage
assign_df(x, df_default = 4)
Value
Vector of length ncol(x) with degrees of freedom for each variable in x.
Arguments
x
input matrix.
df_default
default df to be used. Default is 4.
Details
Variables with fewer than or equal to three unique values, for example,
will be assigned df = 1. df = 2 will be assigned to variables with 4-5
unique values, and df = 4 will be assigned to variables with unique values
greater than or equal to 6.