time to loss of skill vs population size
All checks were successful
Build and deploy the book / book (push) Successful in 15s
All checks were successful
Build and deploy the book / book (push) Successful in 15s
This commit is contained in:
parent
75b2fed2d6
commit
e2c79bde4a
1 changed files with 4 additions and 29 deletions
|
|
@ -403,7 +403,7 @@ extinction_summary <- data.frame(
|
||||||
)
|
)
|
||||||
```
|
```
|
||||||
|
|
||||||
```{r skill-extinction-boxplot, fig.width=3.5, fig.height=7.5, fig.cap=paste("Time to extinction among runs with observed extinction, from", extinction_repeats, "runs per population size. ")}
|
```{r skill-extinction-boxplot, fig.width=5, fig.height=7.5, fig.cap=paste("Time to extinction among runs with observed extinction, from", extinction_repeats, "runs per population size. ")}
|
||||||
old_par <- par(mar = c(6, 4.5, 1, 1))
|
old_par <- par(mar = c(6, 4.5, 1, 1))
|
||||||
|
|
||||||
if (any(lengths(extinction_times) > 0)) {
|
if (any(lengths(extinction_times) > 0)) {
|
||||||
|
|
@ -414,21 +414,13 @@ if (any(lengths(extinction_times) > 0)) {
|
||||||
border = line_cols,
|
border = line_cols,
|
||||||
outpch = 16,
|
outpch = 16,
|
||||||
outcex = 0.7,
|
outcex = 0.7,
|
||||||
ylim = range(0, unlist(extinction_times)),
|
ylim = c(10,5000),
|
||||||
range=0,
|
range=0,
|
||||||
xlab = "",
|
xlab = "Population size",
|
||||||
ylab = "Generations until extinction",
|
ylab = "Generations until extinction",
|
||||||
lig="y",
|
log="y",
|
||||||
las = 1
|
las = 1
|
||||||
)
|
)
|
||||||
mtext(
|
|
||||||
paste0(lengths(extinction_times), "/", extinction_repeats, " extinctions"),
|
|
||||||
side = 1,
|
|
||||||
at = seq_along(population_sizes),
|
|
||||||
line = 2.3,
|
|
||||||
cex = 0.9
|
|
||||||
)
|
|
||||||
mtext("Population size", side = 1, line = 4.3)
|
|
||||||
} else {
|
} else {
|
||||||
plot.new()
|
plot.new()
|
||||||
text(0.5, 0.5, "No extinctions were observed within the generation limit.")
|
text(0.5, 0.5, "No extinctions were observed within the generation limit.")
|
||||||
|
|
@ -437,20 +429,3 @@ if (any(lengths(extinction_times) > 0)) {
|
||||||
par(old_par)
|
par(old_par)
|
||||||
```
|
```
|
||||||
|
|
||||||
```{r skill-extinction-summary}
|
|
||||||
knitr::kable(
|
|
||||||
extinction_summary,
|
|
||||||
digits = 1,
|
|
||||||
caption = paste(
|
|
||||||
"Outcomes across", extinction_repeats,
|
|
||||||
"runs per population size. Median extinction times are in generations",
|
|
||||||
"and include only observed extinctions."
|
|
||||||
)
|
|
||||||
)
|
|
||||||
```
|
|
||||||
|
|
||||||
The spread of extinction times shows why one run is insufficient to characterise
|
|
||||||
the loss of highly skilled people. Larger populations can retain these skills
|
|
||||||
for longer, but outcomes still vary because copying is random. These boxplots
|
|
||||||
describe the timing of loss **conditional on extinction being observed**; the
|
|
||||||
table also shows how often extinction occurred among all the runs.
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue