binary: Defines variables as binary
Description
Defines variables of a latent variable model
(lvm-object from the lava package) as
binary.
Usage
"binary"(x,var=NULL, ...) "binary"(x, ...) <- value
Arguments
var
Formula or vector of variable names
value
Formula or vector of variable names
...
Additional arguments parsed to lower-level
functions
Value
lvm-object (or vector of variable names if called
without any arguments)
Details
This function sets the status of variables to 'binary'.
For use with the estimate method a probit-link
will be assumed. Used with the sim method normal
distributed data will be simulated followed by
thresholding at 0. To simulate data where the dichotomous
variable has a direct effect on the outcome the
distribution method can be used, e.g.
distribution(m,~x) <- binomial.lvm("probit").