compare_functions {DeclareDesign} | R Documentation |
Compare two designs
Description
Compare two designs
Usage
compare_designs(
design1,
design2,
format = "ansi8",
pager = "off",
context = -1L,
rmd = FALSE
)
compare_design_code(
design1,
design2,
format = "ansi256",
mode = "sidebyside",
pager = "off",
context = -1L,
rmd = FALSE
)
compare_design_summaries(
design1,
design2,
format = "ansi256",
mode = "sidebyside",
pager = "off",
context = -1L,
rmd = FALSE
)
compare_design_data(
design1,
design2,
format = "ansi256",
mode = "sidebyside",
pager = "off",
context = -1L,
rmd = FALSE
)
compare_design_estimates(
design1,
design2,
format = "ansi256",
mode = "auto",
pager = "off",
context = -1L,
rmd = FALSE
)
compare_design_inquiries(
design1,
design2,
format = "ansi256",
mode = "sidebyside",
pager = "off",
context = -1L,
rmd = FALSE
)
Arguments
design1 |
A design object, typically created using the + operator |
design2 |
A design object, typically created using the + operator |
format |
Format (in console or HTML) options from |
pager |
Pager option from |
context |
Context option from |
rmd |
Set to |
mode |
Mode options from |
Examples
design1 <- declare_model(N = 100, u = rnorm(N), potential_outcomes(Y ~ Z + u)) +
declare_inquiry(ATE = mean(Y_Z_1 - Y_Z_0)) +
declare_sampling(S = complete_rs(N, n = 75)) +
declare_assignment(Z = complete_ra(N, m = 50)) +
declare_measurement(Y = reveal_outcomes(Y ~ Z)) +
declare_estimator(Y ~ Z, inquiry = "ATE")
design2 <- declare_model(N = 200, U = rnorm(N),
potential_outcomes(Y ~ 0.5*Z + U)) +
declare_inquiry(ATE = mean(Y_Z_1 - Y_Z_0)) +
declare_sampling(S = complete_rs(N, n = 100)) +
declare_assignment(Z = complete_ra(N, m = 25)) +
declare_measurement(Y = reveal_outcomes(Y ~ Z)) +
declare_estimator(Y ~ Z, .method = lm_robust, inquiry = "ATE")
if (require("diffobj")) {
compare_designs(design1, design2)
compare_design_code(design1, design2)
compare_design_summaries(design1, design2)
compare_design_data(design1, design2)
compare_design_estimates(design1, design2)
compare_design_inquiries(design1, design2)
}
[Package DeclareDesign version 1.0.10 Index]