restrict_by_labels: Reduce nodal types using labels

View source: R/set_restrictions.R

restrict_by_labelsR Documentation

Reduce nodal types using labels

Description

Reduce nodal types using labels

Usage

restrict_by_labels(
  model,
  labels,
  given = NULL,
  keep = FALSE,
  update_types = TRUE,
  wildcard = FALSE
)

Arguments

model

A causal_model. A model object generated by make_model.

labels

A list of character vectors specifying nodal types to be kept or removed from the model.

given

A character vector or list of character vectors specifying nodes on which the parameter set to be restricted depends. When mixing labels that are further restricted by given and ones that are not, labels without given restrictions should have given specified as one of NULL, NA, "" or " ".

keep

Logical. If 'FALSE', removes and if 'TRUE' keeps only causal types specified by restriction.

Value

An object of class causal_model. The causal types and nodal types in the model are reduced according to the stated restriction.

See Also

Other restrictions: restrict_by_query(), set_restrictions()


CausalQueries documentation built on June 28, 2022, 1:05 a.m.