# NOT RUN {
library(bumblebee)
library(dplyr)
# Compute confidence intervals for estimated transmission flows
# We shall use the data of HIV transmissions within and between intervention and control
# communities in the BCPP/Ya Tsie HIV prevention trial. To learn more about the data
# ?counts_hiv_transmission_pairs and ?sampling_frequency
# Load and view data
#
# The data comprises counts of observed directed HIV transmission pairs between individuals
# sampled from intervention and control communities (i.e. num_linked_pairs_observed);
# and the estimated HIV transmissions within and between intervention and control
# communities in the BCPP/Ya Tsie trial population adjusted for sampling heterogneity
# (i.e. \code{est_linkedpairs_in_population}). See ?estimate_theta_hat() for details on
# computing \code{est_linkedpairs_in_population} and \code{theta_hat}.
results_estimate_theta_hat <- estimated_hiv_transmission_flows[, c(1:13)]
results_estimate_theta_hat
# Compute Goodman confidence intervals (Default)
results_estimate_multinom_ci <- estimate_multinom_ci(
df_theta_hat = results_estimate_theta_hat,
detailed_report = FALSE)
# View results
results_estimate_multinom_ci
# Compute Goodman, Sison-Glaz and Queensbury-Hurst confidence intervals
results_estimate_multinom_ci_detailed <- estimate_multinom_ci(
df_theta_hat = results_estimate_theta_hat,
detailed_report = TRUE)
# View results
results_estimate_multinom_ci_detailed
# }
Run the code above in your browser using DataLab