estimate_c_hat {bumblebee}R Documentation

estimate_c_hat Estimates probability of clustering

Description

This function estimates c_hat, the probability that a randomly selected pathogen sequence in one population group links to at least one pathogen sequence in another population group.

Usage

estimate_c_hat(df_counts_and_p_hat, ...)

## Default S3 method:
estimate_c_hat(df_counts_and_p_hat, ...)

Arguments

df_counts_and_p_hat

A data.frame returned by the function: estimate_p_hat()

...

Further arguments.

Value

Returns a data.frame containing:

Methods (by class)

References

  1. Magosi LE, et al., Deep-sequence phylogenetics to quantify patterns of HIV transmission in the context of a universal testing and treatment trial – BCPP/ Ya Tsie trial. To submit for publication, 2021.

  2. Carnegie, N.B., et al., Linkage of viral sequences among HIV-infected village residents in Botswana: estimation of linkage rates in the presence of missing data. PLoS Computational Biology, 2014. 10(1): p. e1003430.

See Also

See estimate_p_hat to prepare input data to estimate c_hat

Examples

library(bumblebee)
library(dplyr)

# Estimate the probability of clustering between individuals from two population groups of interest

# 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, ?sampling_frequency and ?estimated_hiv_transmission_flows


# Load and view data
#
# The input data comprises counts of observed directed HIV transmission pairs within and
# between intervention and control communities in the BCPP/Ya Tsie trial, sampling 
# information and the probability of linkage between individuals sampled from
# intervention and control communities (i.e. \code{p_hat})
#
# See ?estimate_p_hat() for details on estimating p_hat
results_estimate_p_hat <- estimated_hiv_transmission_flows[, c(1:10)]

results_estimate_p_hat

# Estimate c_hat
results_estimate_c_hat <- estimate_c_hat(df_counts_and_p_hat = results_estimate_p_hat)

# View results
results_estimate_c_hat


[Package bumblebee version 0.1.0 Index]