sample_mc_binary_cov: Sample binary covariate transmission trees

Description Usage Arguments Details Value

View source: R/sample-mc-binary-cov.R

Description

Sample binary covariate transmission trees

Usage

1
2
3
4
5
sample_mc_binary_cov(
  B,
  observed_cluster_summaries,
  multiple_outside_transmissions = FALSE
)

Arguments

B

number of MC samples

observed_cluster_summaries

data frame with the following columns

freq

frequency of the following cluster

cluster_size

size of the cluster

x_pos

number of positive x (or 1)

x_neg

number of negative x (or 0)

multiple_outside_transmissions

logical indicating whether to sample from the multiple outside transmissions model. Default is FALSE.

Details

A faster way to draw transmission trees when there is one binary covariate.

Value

a data frame with the following columns, the last one is only needed for the multiple outsider model

freq

frequency of cluster with the following characteristics

cluster_size

size of the cluster

x_pos

number of x positives in the cluster

x_neg

number of x negatives in the cluster

mc_freq

frequency of MC trees with the following

x_pos_trans

number of transmissions from a positive individual in the tree

x_neg_trans

number of transmissions from a negative individual in the tree

root_node_sign

whether root node is pos or neg


skgallagher/InfectionTrees documentation built on July 28, 2021, 2:14 p.m.