binary: Defines variables as binary
Description
Defines variables of a latent variable model (lvm
-object from the
lava
package) as binary.Usage
# S3 method for lvm
binary(x,var=NULL, ...)
# S3 method for lvm
binary(x, ...) <- value
Arguments
…
Additional arguments parsed to lower-level functions
var
Formula or vector of variable names
value
Formula or vector of variable names
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")
.