all_data_types {CausalQueries}R Documentation

All data types

Description

Creates dataframe with all data types (including NA types) that are possible from a model.

Usage

all_data_types(
  model,
  complete_data = FALSE,
  possible_data = FALSE,
  given = NULL
)

Arguments

model

A causal_model. A model object generated by make_model.

complete_data

Logical. If 'TRUE' returns only complete data types (no NAs). Defaults to 'FALSE'.

possible_data

Logical. If 'TRUE' returns only complete data types (no NAs) that are *possible* given model restrictions. Note that in principle an intervention could make observationally impossible data types arise. Defaults to 'FALSE'.

given

A character. A quoted statement that evaluates to logical. Data conditional on specific values.

Value

A data.frame with all data types (including NA types) that are possible from a model.

Examples


all_data_types(make_model('X -> Y'))
model <- make_model('X -> Y') %>% set_restrictions(labels = list(Y = '00'), keep = TRUE)
  all_data_types(model)
  all_data_types(model, complete_data = TRUE)
  all_data_types(model, possible_data = TRUE)
  all_data_types(model, given  = 'X==1')
  all_data_types(model, given  = 'X==1 & Y==1')


[Package CausalQueries version 0.0.3 Index]