You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Version 0.3.0.1 has been submitted to CRAN and is passing [all checks](https://cran.r-project.org/web/checks/check_results_resevol.html). I am now a bit under halfway through writing a first draft of the software note. This note be submitted as a pre-print, and for publication, and will explain how to use the package. It will also replace the current [Get Started](https://bradduthie.github.io/resevol/articles/resevol.html) article and [CRAN vignette](https://cran.r-project.org/web/packages/resevol/vignettes/resevol.html). The structure of the publication introduces some key background, the `mine_gmatrix` function and its underlying logic, the ecology and evolution of pests in the model, and a simple example. I think that two supporting information documents are also in order. The first will explain the evolutionary algorithm in more detail and basically be a version of the [current vignette](https://bradduthie.github.io/resevol/articles/evolutionary_algorithm.html) with maybe some minor revisions. The second will be a more advanced example with complex dynamics and traits, presenting simulations like the ones shown in this journal on [26 AUG 2021](#u-26-AUG-2021). My hope is that this plus the documentation is sufficient for anyone to start using the package.
79
+
80
+
Having submitted version 0.3.0.1, I almost immediately discovered the need for an update that is now version 0.3.1.0. I will hold off on submitting this one to CRAN just yet, as the update is quite minor. The cause was that the `mine_gmatrix` function kept giving a discrepancy between the stress threshold that caused it to terminate and the actual predicted stress of the network it found. The reason for this was that the algorithm was terminating due to finding unusually low stress caused sampling error for the standard random normal loci. In other words, a luck draw for random loci often caused networks to look better at producing desired trait covariances than they actually were. I've addressed this now by first using the mean stress for a whole population of networks to test the termination criteria (`term_cri`) in the `mine_gmatrix` function, rather than the *best* stress out of all networks in the population. But the `mine_gmatrix` function still returns the network that produces the lowest found stress.
81
+
82
+
Second, I have introduced a new diagnostic function to give the distribution of stress predicted from loci.
This simple function now forms part of the package itself, so users can run the output of `mine_gmatrix` and get a better overall picture on how the chosen network performs. The example used in the documentation is below (I've increased the replicates using the argument `reps = 1000`; the default is 10).
The output `stresses` is just a vector of stresses for some number (`indivs`) of initialised genomes. The histogram below shows the distribution for the above example.
118
+
119
+
```{r, echo = FALSE}
120
+
hist(stresses, xlab = "Stress values for initialised genomes",
121
+
main = "", breaks = 20);
122
+
```
123
+
124
+
This should at least make it easier for users to decide if they do or do not like the output of `mine_gmatrix` for use in a new set of simulations. The above example shows stress that is quite consistent, but if we let the simulation run for longer to find a better solution, the stress variance seems to increase (note that now `max_gen = 400` below).
hist(stresses, xlab = "Stress values for initialised genomes",
133
+
main = "", breaks = 20);
134
+
```
135
+
136
+
137
+
It might be good to recommend this kind of diagnostic for users, particularly when simulating very complex individuals. I think that I will do this for the supporting information showing an advanced example.
138
+
139
+
75
140
> <aname="u-28-JUN-2022">Update: 28 JUN 2022</a>
76
141
77
142
**Custom crop and pesticide initialisation and rotation**
0 commit comments