add_dots: Helper to fill in missing do operators in causal expression

View source: R/map_query_to_nodal_type.R

add_dotsR Documentation

Helper to fill in missing do operators in causal expression

Description

Helper to fill in missing do operators in causal expression

Usage

add_dots(q, model)

Arguments

q

A character string. Causal query with at least one parent node missing their do operator.

model

A causal_model. A model object generated by make_model.

Value

A causal query expression with all parents nodes set to either 0, 1 or wildcard '.'.

Examples


model <- make_model('X -> Y <- M')
CausalQueries:::add_dots('Y[X=1]', model)
CausalQueries:::add_dots('Y[]', model)


CausalQueries documentation built on June 22, 2024, 6:50 p.m.