Closed gregorgorjanc closed 8 months ago
We will show how to do this in the next paper covering/adding spatial support - see https://github.com/HighlanderLab/SIMplyBee/issues/521 and future work.
Done by @janaobsteter in devel:
https://github.com/HighlanderLab/SIMplyBee/commit/c9576aac81565b876b081a27716d9521cb654e5e
There are many ways how to do this, but the idea is simply this. We want to generate phenotypes from such a model:
$$y_i = mu + g_i + l_i + e_i,$$
where $l_i$ is a location effect and these effects are such that locations close together have a similar effect. We have done this in this study https://gsejournal.biomedcentral.com/articles/10.1186/s12711-020-00588-w, which has an appendix with simulation and analysis code at https://figshare.com/articles/code/Additional_File_2/12403898 - specifically, we should look at
SimulatePhenotype.R
andSimulateSpatialEffects.R