Skip to contents

Shiny interface

Most users will only need to use this function.

specify_graph()
Shiny interface to specify network structure and compute bounds
causaloptim-package causaloptim
An Interface to Specify Causal Graphs and Compute Bounds on Causal Effects

Direct interface

Functions for creating and interacting with the algorithm.

analyze_graph()
Analyze the causal graph and effect to determine constraints and objective
optimize_effect_2()
Run the optimizer to obtain symbolic bounds
initialize_graph()
Initialize an igraph object for use with causaloptim
create_causalmodel()
Create a structural causal model from a graph or a set of response functions
create_response_function()
Translate regular DAG to response functions
create_linearcausalproblem()
Create linear causal problem from causal model and effect
latex_bounds()
Latex bounds equations
sample_distribution()
Sample a distribution of observable probabilities that satisfy the causal model
rdirichlet()
Sample from a Dirichlet distribution
check_constraints_violated()
Check whether any of the observable constraints implied by the causal model are violated for a given distribution of observables
check_linear_objective()
Check linearity of objective function implied by a causal model and effect
plot(<linearcausalproblem>)
Plot the graph from the causal problem with a legend describing attributes
print(<linearcausalproblem>)
Print the causal problem
print(<causalmodel>)
Print relevant information about the causal model

Utilities

Internal functions and deprecated

causalproblemcheck()
Check conditions on causal problem
constraintscheck()
Check constraints
create_effect_vector()
Translate target effect to vector of response variables
create_q_matrix()
Translate response functions into matrix of counterfactuals
create_response_function()
Translate regular DAG to response functions
graphrescheck()
Check conditions on digraph
get_default_effect()
Define default effect for a given graph
opt_effect()
Compute a bound on the average causal effect
parse_constraints()
Parse text that defines a the constraints
parse_effect()
Parse text that defines a causal effect
plot_graphres()
Plot the analyzed graph object
querycheck()
Check conditions on query
simulate_bounds()
Simulate bounds
btm_var()
Recursive function to get the last name in a list
check_parents()
Check for paths from from to to
find_all_paths()
Find all paths in a causal model
interpret_bounds()
Convert bounds string to a function
list_to_path()
Recursive function to translate an effect list to a path sequence
update_effect()
Update the effect in a linearcausalproblem object