Description Usage Arguments Examples
View source: R/gbiqq_designer.R
Define a model, estimand, and answer strategy.
1 2 3 |
model |
A model object generated by |
restrictions |
A list of character vectors specifying nodal types to be kept or removed from the model. Use |
priors |
A numeric vector. Dirichlet hyperparameters. |
parameters |
A numeric vector. True parameters. |
inquiry |
A named list of strings. Names are estimand labels and values are strings containing estimand definitions. See 'Examples' for correct format. |
data_strat |
should be of the form "list(n_obs = n_obs, vars = list("X", "Y"), probs = list(...), n = NULL, subsets = list(...)) |
answer_strat |
priors used at the analysis stage, if different |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 | require("DeclareDesign")
my_design <- gbiqq_designer(
model = make_model("X -> Y"),
parameters = c(.5, .5, .1, .7, .1, .1), # Truth
data_strat = list(n_obs = 5, vars = list(NULL), probs = list(NULL),
ns = NULL,
subsets = list(NULL)),
inquiry = list(ATE = "Y[X=1] - Y[X=0]"))
## Not run: draw_data(my_design)
## Not run: draw_estimands(my_design)
## Not run: draw_estimates(my_design)
## Not run: diagnose_design(my_design, sims = 2)
my_design <- gbiqq_designer(
model = make_model("X -> M -> Y"),
inquiry = list(ATE = "Y[X=1] - Y[X=0]"),
data_strat = list(n_obs = 5,
vars = list(c("X", "Y"), "M"),
probs = list(1, .5),
n = NULL,
subsets = list(NULL, "X==1 & Y==0")),
answer_strat = NULL
)
df <- draw_data(my_design)
draw_estimands(my_design)
## Not run:
get_estimates(my_design, df)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.