Learn R Programming

eggCounts (version 0.4-1)

simData2s: Simulate faecal egg count data (2-sample situation)

Description

Generates two samples of (zero-inflated) egg count data

Usage

simData2s(n = 10, m.pre = 500, delta = 0.1, k = 0.5, psi = 1,
  psiA = psi, f = 50, paired = TRUE)

Arguments

n
sample size (number of faeces collected pre and post treatment)
m.pre
true number of eggs per gram (EPG) (i.e. worm burden) before treatment
delta
reduction in mean after treatment
k
overdispersion factor, $k \to \infty$ corresponds to Poisson
psi
prevalence (i.e. proportion of infected animals)
psiA
prevalence after treatment
f
correction factor of the egg counting technique
paired
logical indicating a paired or unpaired situation

Value

  • a data-frame with the observed EPGs (obs.prePost), number of eggs counted on microscope slide (master) and true egg counts (true).

Examples

Run this code
fec <- simData2s(n=10, m.pre=500, delta=0.8, k=0.5, psi=0.7)

Run the code above in your browser using DataLab