Perform a parametric bootstrapping correction on an estimated rho vector
Perform a parametric bootstrapping correction on an estimated rho vector
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
rho_est: the rho value previously estimated from MCMC GSI from the provided reference and mixture data
pi_est: the pi value previously estimated from MCMC GSI from the provided reference and mixture data
D: a two-column genetic dataframe containing the reference and mixture data from which rho_est was computed; with "repunit", "collection", and "indiv" columns
gen_start_col: the first column of genetic data in D. All columns after gen_start_col must be genetic data
pi_prior: 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.
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.
Returns
bootstrap_rho returns a new rho value, corrected by parametric bootstrapping.