simulate_IBD_corMLPE | R Documentation |
Simulate data from an isolation-by-distance model with MLPE correlation structure
simulate_IBD_corMLPE( sets = 1, elements = rep(10, sets), intercept = 0, slope = 0.5, random_effects = diag(2), correlation = 0.25, residual_sd = 1, distances = NULL, seed = 1 )
sets |
number of distinct sets (e.g. species) containing elements that are compared |
elements |
vector, number of elements (e.g. populations, individuals) in each set |
intercept |
intercept of regression line |
slope |
slope of regression line |
random_effects |
variance-covariance matrix for random intercepts/slopes per set; ignored if sets==1 |
correlation |
parameter of MLPE correlation structure; between 0 and 0.5 |
residual_sd |
standard deviation of (correlated) errors |
distances |
optional; list of distance matrices (one for each set), or a single distance matrix if sets==1; if absent, locations are simulated from a 2d uniform distribution |
seed |
random seed used to simulate data |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.