data("data_campus_involvement")
estimate_from_raw <- esci::estimate_pdiff_two(
esci::data_campus_involvement,
CommuterStatus,
Gender
)
# To visualize the estimate
myplot_from_raw <- esci::plot_pdiff(estimate_from_raw)
# To conduct a hypothesis test
res_htest_from_raw <- esci::test_pdiff(estimate_from_raw)
# From summary_data
estimate_from_summary <- esci::estimate_pdiff_two(
comparison_cases = 10,
comparison_n = 20,
reference_cases = 78,
reference_n = 252,
grouping_variable_levels = c("Original", "Replication"),
conf_level = 0.95
)
# To visualize the estimate
myplot_from_summary <- esci::plot_pdiff(estimate_from_summary)
#' # To conduct a hypothesis test
res_htest_from_summary <- esci::test_pdiff(estimate_from_summary)
Run the code above in your browser using DataLab