Learn R Programming

linktree (version 0.1.0)

get_pi: Calculate Pi Values

Description

Calculates the within-group transmission proportion 'pi' for each group in the data.

Usage

get_pi(from, to, alpha = 0.05)

Value

A data frame with the group names and the corresponding 'pi' values and confidence intervals.

Arguments

from

A vector of infectors.

to

A vector of infectees.

alpha

The significance level for the confidence intervals.

Examples

Run this code
from <- c("A", "A", "NA", "C", "C", "C")
to <- c("A", "B", "B", "C", "C", "C")
get_pi(from, to, alpha = 0.05)

Run the code above in your browser using DataLab