View source: R/simulation_pipelines.R
Hasselman_sim_colls | R Documentation |
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)
RU_starts |
a vector delineating the reporting units in |
RU_vec |
a vector of collection indices, grouped by reporting unit;
generated by |
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.
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
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.