powered by
Define intervention in a `lvm` object
# S3 method for lvm intervention(object, to, value, dist = none.lvm(), ...)
lvm object
String defining variable or formula
function defining intervention
Distribution
Additional arguments to lower level functions
regression lvm sim
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)
Run the code above in your browser using DataLab