Learn R Programming

linktree (version 0.1.0)

get_delta: Calculate delta

Description

Computes the scaled tansmission assortativity coefficient, see function gamma2delta.

Usage

get_delta(from, to, f, alpha = 0.05)

Value

A data frame with the estimated delta, lower and upper confidence limits for each group.

Arguments

from

A vector of infectors.

to

A vector of infectees.

f

A named numeric value representing the prevalence of each group in the population or directly the group sizes.

alpha

The significance level for the confidence interval.

Examples

Run this code
from <- c("A", "A", NA, "C", "C", "C")
to <- c("A", "B", "B", "C", "C", "C")
f <- c(A = 0.3, B = 0.2, C = 0.5)
get_delta(from, to, f, alpha = 0.05)

Run the code above in your browser using DataLab