clpDataSim: Simulate ERR data from a compound lognormal Poisson...

View source: R/clpDataSim.R

clpDataSimR Documentation

Simulate ERR data from a compound lognormal Poisson distribution

Description

Simulate ERR data from a compound lognormal Poisson distribution

Usage

clpDataSim(
  R,
  N,
  reduction,
  community_mean,
  cv_between,
  cv_within,
  cv_slide,
  cv_reduction,
  overall_mean = exp(mean(log(community_mean))),
  edt = 24
)

Arguments

R

The number of replicate datasets

N

The maximum number of individuals in total

reduction

The geometric mean reduction (may be vectorised)

community_mean

A vector of geometric mean pre-treatment EPG in each community

cv_between

A vector of CV reflecting variation in EPG between individuals in each community

cv_within

Day-to-day variation in EPG within an individual

cv_slide

Variation between faecal samples from the same individual and day

cv_reduction

Variation in efficacy between individuals

overall_mean

The overall mean (i.e. the mean of the distribution reflecting community means)

edt

The egg detection threshold (24 EPG is standard for Kato-Katz)

Value

A data frame containing the simulated data

Examples

clpDataSim(10, 10, c(0.05, 0.1, 0.15), c(800,1000), c(1.5, 1), 1, 1, 1)


ku-awdc/eggSim documentation built on Feb. 23, 2024, 10:22 p.m.