View source: R/query_helpers.R
te | R Documentation |
Generate a statement for (Y(1) - Y(0)). This statement when applied to
a model returns an element in (1,0,-1) and not a set of cases.
This is useful for some purposes such as querying a model, but not for
uses that require a list of types, such as set_restrictions
.
te(X, Y)
X |
A character. The quoted name of the input node |
Y |
A character. The quoted name of the outcome node |
A character statement of class statement
Other statements:
complements()
,
decreasing()
,
increasing()
,
interacts()
,
non_decreasing()
,
non_increasing()
,
substitutes()
te('A', 'B')
model <- make_model('X->Y') %>% set_restrictions(increasing('X', 'Y'))
query_model(model, list(ate = te('X', 'Y')), using = 'parameters')
# set_restrictions breaks with te because it requires a listing
# of causal types, not numeric output.
## Not run:
model <- make_model('X->Y') %>% set_restrictions(te('X', 'Y'))
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.