Description Usage Arguments Details Value Author(s) See Also Examples

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

1 2 3 |

`n` |
sample size (number of animals) |

`preMean` |
true pre-treatment epg |

`delta` |
proportion of epg left after treatment, between 0 and 1. 1 - |

`kappa` |
overdispersion parameter, |

`deltaShape` |
shape parameter for the distribution of reductions. If NULL, the same reduction is applied to the latent true epg of each animal. |

`phiPre` |
pre-treatment prevalence (i.e. proportion of infected animals), between 0 and 1 |

`phiPost` |
post-treatment prevalence, between 0 and 1 |

`f` |
correction factor of the egg counting technique, either an integer or a vector of integers with length |

`paired` |
logical. If TRUE, paired samples are simulated. Otherwise unpaired samples are simulated. |

`rounding` |
logical. If TRUE, the Poisson mean for the raw counts is rounded. The rounding applies since the mean epg is frequently reported as an integer value. For more information, please see Details. |

`seed` |
an integer that will be used in a call to set.seed before simulation. If NULL, a random seed is allocated. |

In the simulation of raw (`master`

) counts, it follows a Poisson distribution with some mean. The mean is frequently rounded down if it has a very low value and `rounding = TRUE`

,there expects to be a up to 3-10% positive bias in the mean reduction when *μ* < 150 and *δ* < 0.1. Set `rounding = FALSE`

if one does not wish to have any bias.

A data.frame with six columns, namely the observed epg (`obs`

),
number of eggs counted on microscope slide (`master`

) and true epg in the sample (`true`

) for both pre- and post- treatment.

Craig Wang

Michaela Paul

`fecr_stan`

for analyzing faecal egg count data with two samples

1 2 3 4 5 6 |

eggCounts documentation built on May 2, 2018, 5:06 p.m.

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.