optimize_effect {causaloptim}R Documentation

Run the Balke optimizer

Description

Given a object with the linear programming problem set up, compute the bounds using the c++ code developed by Alex Balke. Bounds are returned as text but can be converted to R functions using interpret_bounds, or latex code using latex_bounds. This legacy function has been replaced as default with the more efficient optimize_effect_2.

Usage

optimize_effect(obj)

Arguments

obj

Object as returned by analyze_graph

Value

An object of class "balkebound" that contains the bounds and logs as character strings

See Also

optimize_effect_2 which is the current default

Examples

b <- graph_from_literal(X -+ Y, Ur -+ X, Ur -+ Y)
V(b)$leftside <- c(0,0,0)
V(b)$latent <- c(0,0,1)
V(b)$nvals <- c(2,2,2)
E(b)$rlconnect <- E(b)$edge.monotone <- c(0, 0, 0)
obj <- analyze_graph(b, constraints = NULL, effectt = "p{Y(X = 1) = 1} - p{Y(X = 0) = 1}")
optimize_effect(obj)

[Package causaloptim version 0.9.8 Index]