impute_root_inner: Impute the root node for an observed cluster (inner function)

Description Usage Arguments Value Examples

View source: R/impute-root.R

Description

Impute the root node for an observed cluster (inner function)

Usage

1
impute_root_inner(data, n, n_pos, B = 1, prob_pos = 0.5)

Arguments

data

data frame with the following columns (one row)

freq

frequency of cluster of size n, positive smear x

n

cluster size

n_pos

number of positive smears in cluster

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 = 1, n_pos = 1, freq = 10
out <- impute_root_inner(data)
head(out)

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