loglike_fast: Calculate the log likelihood of a cluster conditioned on size...

Description Usage Arguments Value

View source: R/loglike-faster2.R

Description

Calculate the log likelihood of a cluster conditioned on size and smear pos. num

Usage

1
2
3
4
5
6
7
loglike_fast(
  par,
  data,
  sampled_trees_summary,
  is_truncated = FALSE,
  return_neg = FALSE
)

Arguments

par

vector where the first parameter is "beta_0" and the second is "beta_1"

data

data frame with columns

n

number in cluster

n_pos

number of positive smears in cluster

freq

number of times this frequency occurs

sampled_trees_summary

data frame with the following columns

is_truncated

logical. Default is FALSE

return_neg

logical. Should I return the negative log likelihood?

i_pos

number of transmission from a smear positive person

n_pos

number of positive smears

n

cluster size

freq

time it occurs

Value

log likelihood summed over the clusters


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