Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

intervention.lvm

Define intervention


Description

Define intervention in a 'lvm' object

Usage

## S3 method for class 'lvm'
intervention(object, to, value, dist = none.lvm(), ...)

Arguments

object

lvm object

to

String defining variable or formula

value

function defining intervention

dist

Distribution

...

Additional arguments to lower level functions

See Also

regression lvm sim

Examples

m <- lvm(y ~ a + x, a ~ x)
distribution(m, ~a+y) <- binomial.lvm()
mm <- intervention(m, "a", value=3)
sim(mm, 10)
mm <- intervention(m, a~x, function(x) (x>0)*1)
sim(mm, 10)

lava

Latent Variable Models

v1.6.10
GPL-3
Authors
Klaus K. Holst [aut, cre], Brice Ozenne [ctb], Thomas Gerds [ctb]
Initial release
2021-09-01

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.