Reduce nodal types using statement
restrict_by_query(model, statement, join_by = "|", given = NULL, keep = FALSE)
A list with two components: 1. a vector with parameters names of parameters implicated by the restrictions, 2. a vector of subsetting instructions used to identify implicated causal types
a model created by make_model()
a list of character vectors specifying nodal types to be
removed from the model. Use get_nodal_types
to see syntax.
A string or a list of strings. The logical operator joining
expanded types when statement
contains wildcard (.
).
Can take values '&'
(logical AND) or '|'
(logical OR).
When restriction contains wildcard (.
) and join_by
is not
specified, it defaults to '|'
, otherwise it defaults to NULL
.
A character vector or list of character vectors specifying
nodes on which the parameter set to be restricted depends. given
must either be NULL or of the same length as statement
. When mixing
statements that are further restricted by given
and ones that are
not, statements without given
restrictions should have given
specified as one of NULL
, NA
, ""
or " "
.
Logical. If `FALSE`, removes and if `TRUE` keeps only
causal types specified by restriction
.
Other restrictions:
restrict_by_labels()
,
set_restrictions()