Generate a random population structure and mixture sample, as in Hasselman et al. 2015
Generate a random population structure and mixture sample, as in Hasselman et al. 2015
Creates random reporting unit (rho) and collection (omega) proportions, and a sim_colls vector for simulation of individual genotypes, based on the methods used in Hasselman et al. (2015)
Hasselman_sim_colls(RU_starts, RU_vec, size =100)
Arguments
RU_starts: a vector delineating the reporting units in RU_vec; generated by tcf2param_list
RU_vec: a vector of collection indices, grouped by reporting unit; generated by tcf2param_list
Returns
Hasselman_sim_colls returns a list with three elements. The first two are a rho vector and an omega vector, respectively, both with alpha parameters = 1.5. The third is a vector of origins for simulated individuals, sampled from the collections with probabilities = omega
Details
This function is designed specifically to recreate the simulations in Hasselman et al. (2015), to check for the bias that was observed therein. Rho (reporting unit proportions) is chosen with alphas of 1.5, and omega (collection proportions) chosen with the same alpha, then scaled by the corresponding rho.