impute_root: Impute the root node for an observed cluster

Description Usage Arguments Value Examples

View source: R/impute-root.R

Description

Impute the root node for an observed cluster

Usage

1
impute_root(data, B = 1, prob_pos = 0.5)

Arguments

data

data frame with the following columns

n

size of cluster

n_pos

number of positive smears

freq

frequency of cluster of size n, positive smear x

B

scaling factor of data imputation. Default is 1.

prob_pos

probability of imputed root being positive smear.

Value

data frame with new_data, same column names but different counts.

Examples

1
2
3
data <- data.frame(n = c(1, 1, 5), n_pos = c(1, 0, 3), freq = c(10, 2, 4))
out <- impute_root(data)
head(out)

skgallagher/TBornotTB documentation built on April 21, 2020, 1:19 p.m.