Learn R Programming

linktree

linktree is a novel framework that estimates group transmission assortativity from transmission trees.

Installation

You can install the development version of linktree from GitHub with:

# install.packages("pak")
pak::pak("CyGei/linktree")
library(linktree)

Definition

Group transmission assortativity quantifies the extent to which individuals transmit within their own group compared to others. The methodology is described in our paper, and briefly discussed on YouTube.

The $\gamma$ coefficient ranges from 0 to $\infty$. It describes the excess propability of transmitting within your own group versus other groups. See get_gamma().

We can rescale $\gamma$ to the $\delta$ coefficient, which ranges from -1 to 1 using get_delta().

Documentation

linktree requires that you have transmission chain data (i.e. who infected whom) and group membership for each individual in the transmission chain.

For more information, check the dedicated vignette.

Copy Link

Version

Install

install.packages('linktree')

Version

0.1.0

License

CC BY 4.0

Issues

Pull Requests

Stars

Forks

Maintainer

Cyril Geismar

Last Published

December 15th, 2025

Functions in linktree (0.1.0)

check_xn

Check 'x' and 'n' values
delta2gamma

Convert delta to gamma
get_delta

Calculate delta
gamma2delta

Convert gamma to delta
plot.linktree

Plot linktree objects
get_pi

Calculate Pi Values
get_gamma

Calculate gamma
check_alpha

Check 'alpha' value
check_gamma

Check 'gamma' value
check_delta

Check 'delta' value
check_fromto

Check 'from' and 'to' vectors
sim_tree

Simulated transmission tree
check_flevels

Check 'f' levels