get_formula {dosearch}R Documentation

Retrieve the identifying formula of a causal query

Description

Returns the identifying formula describing a causal query of an object of class "dosearch".

Usage

get_formula(x, run_again = FALSE)

Arguments

x

an object of class "dosearch".

run_again

a logical value. If TRUE, run the search again to obtain a formula for the query if one was not requested in the function call that produced x.

Value

A character string representing the query in terms of the input data.

Author(s)

Santtu Tikka

Examples


data <- "P(x,y,z)"
query <- "P(y|do(x))"
graph <- "
  x -> y
  z -> x
  z -> y
"
x <- dosearch(data, query, graph, control = list(formula = FALSE))
get_formula(x, run_again = TRUE)

[Package dosearch version 1.0.8 Index]