Takes an estimate of rho, and a two-column format genetic data frame containing both reference and mixture data. Returns a new rho corrected by parametric bootstrapping
bootstrap_rho(
rho_est,
pi_est,
D,
gen_start_col,
niter = 100,
reps = 2000,
burn_in = 100,
pi_prior = NA,
pi_prior_sum = 1
)
bootstrap_rho
returns a new rho value, corrected by parametric
bootstrapping.
the rho value previously estimated from MCMC GSI from the provided reference and mixture data
the pi value previously estimated from MCMC GSI from the provided reference and mixture data
a two-column genetic dataframe containing the reference and mixture
data from which rho_est
was computed; with "repunit", "collection",
and "indiv" columns
the first column of genetic data in D. All columns after
gen_start_col
must be genetic data
The prior to be added to the collection allocations, in order
to generate pseudo-count Dirichlet parameters for the simulation of a new pi vector.
Non-default values should be a vector of length equal to the number of populations
in the reference dataset. Default value of NA leads to the
calculation of a symmetrical prior based on pi_prior_sum
.
total weight on default symmetrical prior for pi.
In parametric bootstrapping, niter
new mixture datasets are simulated by
individual from the reference with reporting unit proportions rho_est
,
and the mean of their MCMC GSI outputs is used to calculate an average bias.
This bias is subtracted from rho_est to give the output. The number of individuals
in each simulated bootstrap dataset is equal to the number of "mixture" individuals
in D
.