- ...
a matrix or data frame with incomplete data, where missing
values are coded as NA
. Alternatively, an expression
indicating the variable names in data
e.g.,
na.indicator(x1, x2, x3, data = dat)
. Note that the operators
.
, +
, -
, ~
, :
, ::
,
and !
can also be used to select variables, see 'Details'
in the df.subset
function.
- data
a data frame when specifying one or more variables in the
argument ...
. Note that the argument is NULL
when specifying a matrix or data frame for the argument ...
.
- na
an integer value specifying, i.e., either 1
for
0 = observed
and 1 = missing
, or 0
(default) for
1 = observed
and 0 = missing
.
- append
logical: if TRUE
(default), missing data indicator matrix
is appended to the data frame specified in the argument data
.
- name
a character string indicating the name suffix of indicator variables
By default, the indicator variables are named with the ending
".i"
resulting in e.g. "x1.i"
and "x2.i"
.
Note that when selecting one single variable, the indicator variable
is named x.i
by default or named after the argument name
.
- as.na
a numeric vector indicating user-defined missing values,
i.e. these values are converted to NA
before conducting
the analysis.
- check
logical: if TRUE
(default), argument specification is checked.