context("Print") test_that("HTML tables", { data("darfur") # runs regression model model <- fixest::feols(peacefactor ~ directlyharmed + age + farmer_dar + herder_dar + pastvoted + hhsize_darfur + female + village, data = darfur) expect_error(ovb_minimal_reporting(model)) darfur_out <- sensemakr(model, treatment = "directlyharmed", benchmark_covariates = "female", kd = 1:3) out <- ovb_minimal_reporting(darfur_out, format = "html", verbose = F) check <- "\n\n\n\t\n\t\n\n\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\n\n\n \n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\n\n\n\n\n
Outcome: peacefactor
Treatment Est. S.E. t-value $R^2_{Y \\sim D |{\\bf X}}$ $RV_{q = 1}$ $RV_{q = 1, \\alpha = 0.05}$
directlyharmed0.097 0.023 4.184 2.2\\% 13.9\\% 7.6\\%
Note: df = 783; Bound ( 1x female ): $R^2_{Y\\sim Z| {\\bf X}, D}$ = 12.5\\%, $R^2_{D\\sim Z| {\\bf X} }$ = 0.9\\%
" expect_equal(out, check) out <- ovb_minimal_reporting(darfur_out, format = "pure_html", verbose = F) check <- "\n\n\n\t\n\t\n\n\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\n\n\n \n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\n\n\n\n\n
Outcome: peacefactor
Treatment Est. S.E. t-value R2Y~D|X RVq = 1 RVq = 1, α = 0.05
directlyharmed0.097 0.023 4.184 2.2\\% 13.9\\% 7.6\\%
Note: df = 783; Bound ( 1x female ): R2Y~Z|X,D = 12.5\\%, R2D~Z|X = 0.9\\%
" expect_equal(out, check) } )