run_forward_disc.RdUses the DISCent equation, \(r_ij = (f_i + f_j/2)e^(-d_{ij}/m)\) to simulate data expected genetic distances between sample pairs within demes. We assume a beta-binomial model to create realistic "noise" amongst the pairs, where \(Y|p ~ binom(n,p)\) such that \(p ~ beta(\mu * \phi, (1 - \mu) * \phi)\), where \(\mu\) is average relatedness (defined by \(\rij\)) and \(\phi\) is a concentration parameter of that relatedness.
run_forward_disc(
true_params,
geodist_matrix,
samples_per_deme,
overdispersion = 200
)named vector; True F_i and M values to simulate. At least one element must be named "m".
named matrix of geodistances; must be a nxn geodistance matrix, with n corresponding to number of demes and deme names matching the true_param names
integer vector; number of pairs within each deme
numeric; overdispersion parameter in the beta-binomial model; Default: 200
A dataframe of class "DISCsim" containing columns:
Final_Fis: Final inbreeding coefficient estimates
Final_m: Final migration rate estimate
deme_key: Mapping of deme names to indices
cost: Final cost function value(s)