expand_data {CausalQueries}R Documentation

Expand compact data object to data frame

Description

Expand compact data object to data frame

Usage

expand_data(data_events = NULL, model)

Arguments

data_events

A data.frame. It must be compatible with nodes in model. The default columns are event, strategy and count.

model

A causal_model. A model object generated by make_model.

Value

A data.frame with rows as data observation

Examples


model <- make_model('X->M->Y')
make_events(model, n = 5) %>%
  expand_data(model)
make_events(model, n = 0) %>%
  expand_data(model)
 


[Package CausalQueries version 1.1.1 Index]