Description Usage Arguments Value Examples
View source: R/make_estimates_database.R
This function runs many models and can take a long time depending on the size of possible data.
1 2 | make_estimates_database(model, given, possible_data = NULL,
queries = "Y[X=1]>Y[X=0]")
|
model |
A causal model as created by |
possible_data |
A data frame with possible data |
queries |
Queries |
A dataframe
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | #' library(dplyr)
model <- make_model("X->M->Y") %>%
set_restrictions(causal_type_restrict = "Y[M=1]<Y[M=0] | M[X=1]<M[X=0] ") %>%
set_parameter_matrix()
given = data.frame(X = c(0,0,0,1,1,1), M = NA, Y = c(0,0,1,0,1,1))
possible_data <- make_possible_data(model, given)
estimates_database <- make_estimates_database(
model,
given = given,
possible_data,
queries = "Y[X=1]>Y[X=0]")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.