ReDefMiss | R Documentation |
Depending on the type of covariate (factor, numeric binary, continuous) and the interpretation of a missing, this function assigns a value to missings and possibly rescales the continuous variable or recodes a numeric binary one.
ReDefMiss(para, NAzero = F)
para |
Character. Name of the variable. |
NAzero |
Boolean. If |
If NAzero=FALSE
: then if the variable is a numeric binary one (0,1 values), 0's are replaced by -1 and
NAs are replaced by 0; if the variable is a factor, NAs are replaced by level "0" of the factor;
if the variable is continuous (or ratio-scaled) then the median of the non-missing values is subtracted from those
and NAs are replace by 0.
Factor or numeric vector, representing the recoded variable
Mark A. van de Wiel
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.