binary: Defines variables as binary

Description Usage Arguments Details Value Author(s)

Description

Defines variables of a latent variable model (lvm-object from the lava package) as binary.

Usage

1
2
3
4
## S3 method for class 'lvm'
binary(x,var=NULL, ...)
## S3 replacement method for class 'lvm'
binary(x, ...) <- value

Arguments

x

lvm-object

var

Formula or vector of variable names

value

Formula or vector of variable names

...

Additional arguments parsed to lower-level functions

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").

Value

lvm-object (or vector of variable names if called without any arguments)

Author(s)

Klaus K. Holst


lava.tobit documentation built on May 2, 2019, 4:58 p.m.