Skip to contents

Simulate data generated according to the assumed model

Usage

simulate_data(
  mean_coi = NULL,
  num_samples,
  epsilon_pos,
  epsilon_neg,
  sample_cois = NULL,
  locus_freq_alphas = NULL,
  allele_freqs = NULL,
  internal_relatedness_alpha = 0,
  internal_relatedness_beta = 1,
  internal_relatedness = NULL,
  missingness = 0
)

Arguments

mean_coi

Mean multiplicity of infection drawn from a Poisson

num_samples

Total number of biological samples to simulate

epsilon_pos

False positive rate, expected number of false positives

epsilon_neg

False negative rate, expected number of false negatives

sample_cois

List of sample COIs to be used instead of simulating

locus_freq_alphas

List of alpha vectors to be used to simulate from a Dirichlet distribution to generate allele frequencies.

allele_freqs

List of allele frequencies to be used instead of simulating allele frequencies

internal_relatedness_alpha

alpha parameter of beta distribution controlling the random relatedness draws for each sample

internal_relatedness_beta

beta parameter of beta distribution controlling the random relatedness draws for each sample

internal_relatedness

List of internal relatedness values to be used instead of simulating

missingness

probability of data being missing

Value

Simulated data that is structured to go into the MCMC sampler