dominant_lambda <- function(A) {
e <- eigen(A)
max(Mod(e$values))
}
stable <- function(A) {
e <- eigen(A)
w <- Re(e$vectors[, which.max(Mod(e$values))])
round(w / sum(w), 3)
}P3 — Where do the numbers in a matrix come from?
EEE330 Population Ecology · Practical 3
Before you start
So far every matrix came with its numbers. Today you make them yourself: you see that the same rates give different matrices depending on when you count, plan how this afternoon’s rotifer counts will give you the rotifers’ rates, then estimate a teasel matrix from counts of seeds and rosettes and check it for the usual mistakes.
Keep this file and its data folder together in the P03 folder, as they came. Open it in RStudio as before and set the working directory to the source file location (Session › Set Working Directory › To Source File Location).
Write your predictions and answers into this file as you go. When you have finished, render it and upload it as Lastname_P03.html to your Participant Drop Box in OLAT (Practica / Exercises › Participant Folder), as before. A few sentences per question are enough: say what the numbers show and why. It counts towards participation, not for being right; Part 2 is the plan you will use for the rotifer report.
Two helpers from P2, used throughout: λ, the dominant eigenvalue of a matrix, and the stable structure, its eigenvector as shares. You need only what they return; L4 on Thursday explains why they work.
Core and optional. Every part is core. Parts 1 and 2 this morning: the rotifer counts this afternoon need Part 2. Parts 3–5 (teasel) whenever the counts this afternoon or tomorrow leave time, or at home: finish them before Friday, when P4 uses your Field L matrix.
Part 1 — When we count changes the matrix
The time of the census decides what each state and each arrow means (L03). Here is the owl again, from its vital rates (Lande 1988, as in L03 and P2):
| Rate | Symbol | Value |
|---|---|---|
| Survival from fledging to age 1 (fledgling survival × dispersal success) | \(s_Y\) | 0.108 |
| Subadult survival | \(s_S\) | 0.71 |
| Adult survival | \(s_A\) | 0.942 |
| Female fledglings per adult female | \(f_A\) | 0.24 |
The matrix of L03 counts the owls just after breeding: young, subadults and adults. A young owl is counted the moment it fledges. An adult adds young at the next count only if it survives the year and then breeds, so recruitment is \(R_A = s_A f_A\).
s_Y <- 0.108; s_S <- 0.71; s_A <- 0.942; f_A <- 0.24
stages_post <- c("young", "subadult", "adult")
A_post <- matrix(c(0, 0, s_A * f_A,
s_Y, 0, 0,
0, s_S, s_A),
nrow = 3, byrow = TRUE, dimnames = list(stages_post, stages_post))
A_post young subadult adult
young 0.000 0.00 0.22608
subadult 0.108 0.00 0.00000
adult 0.000 0.71 0.94200
dominant_lambda(A_post)[1] 0.96078
Now count the same owls just before breeding. Fledglings are never counted: by the next census they are one year old, if they survived. The states become one-year-olds, two-year-olds and older adults (three years and more), and an adult breeds right after it is counted, so its recruitment is the fledglings it produces times their survival to the next count: \(R_A = f_A s_Y\).
Will the growth rate change when you count before breeding instead of after? Will the stable structure?
Your prediction:
Fill in the pre-breeding matrix: replace each NA with a product of the rates above. Then compute λ and the stable structure of both matrices with the two helpers. Which entries changed, and why does λ not?
Your answer:
stages_pre <- c("age 1", "age 2", "adult 3+")
A_pre <- matrix(c(0, 0, NA,
NA, 0, 0,
0, NA, NA),
nrow = 3, byrow = TRUE, dimnames = list(stages_pre, stages_pre))
# your code hereSolution.
A_pre <- matrix(c(0, 0, f_A * s_Y,
s_S, 0, 0,
0, s_A, s_A),
nrow = 3, byrow = TRUE, dimnames = list(stages_pre, stages_pre))
A_pre age 1 age 2 adult 3+
age 1 0.00 0.000 0.02592
age 2 0.71 0.000 0.00000
adult 3+ 0.00 0.942 0.94200
c(post = dominant_lambda(A_post), pre = dominant_lambda(A_pre)) post pre
0.96078 0.96078
stable(A_post)[1] 0.186 0.021 0.793
stable(A_pre)[1] 0.026 0.019 0.955
λ is the same (0.961): same owls, same rates; only the time of counting moved. One loop around each graph multiplies the same four rates:
\[\text{after breeding: } s_Y \cdot s_S \cdot s_A f_A \qquad \text{before breeding: } s_S \cdot s_A \cdot f_A s_Y\]
The stable structure differs, because the states mean different things: after breeding, about a fifth of the owls counted are fledglings; before breeding, only 3% are one-year-olds. Fledglings that die in their first year are never counted.
Recruitment differs: \(s_A f_A\) = 0.226 after breeding, \(f_A s_Y\) = 0.026 before. Adult survival moves to the new entry from age 2 to adult.
An entry means something only together with its census.
Part 2 — Plan for this afternoon’s rotifer counts
This afternoon (E2) you count the rotifer cultures you set up yesterday, and again tomorrow (E3). Each day you will count, in each tube, live and dead juveniles, amictic adults and mictic adults. Before the counts, decide how each rate will come out of them.
The rotifer life cycle, counted once a day, before the day’s births (pre-breeding census):
- a juvenile survives the day with probability \(s_J\); if it survives, it matures with probability \(\psi_J\), and a maturing juvenile becomes mictic with probability \(m\) (otherwise amictic);
- an amictic adult produces \(f_A\) juveniles per day and survives with probability \(s_A\);
- a mictic adult survives with probability \(s_M\); it produces males or resting eggs, which this model leaves out.
- Draw the life cycle and write the matrix: which entry holds which product of rates?
- Write each of the six rates as a ratio of counts from day \(t\) to day \(t+1\) in one tube that started with juveniles and amictic adults, as in 2025. Which counts do you need, live or dead?
- Now suppose a tube started with amictic adults only, and another with juveniles only. Write the rates again. What changes?
Your answers:
Solution.
With states juvenile, amictic, mictic:
\[\mathbf{A} = \begin{bmatrix} s_J(1-\psi_J) & f_A & 0 \\ s_J\psi_J(1-m) & s_A & 0 \\ s_J\psi_J m & 0 & s_M \end{bmatrix}\]
The matrix on the introduction slides, as shown in class on Tuesday, looks different, but it has the same entries in other symbols (the slides online now use the worksheets’ symbols):
Meaning Introduction slides, as shown in class Worksheets New juveniles per amictic adult, alive at the next count \(S_J F_A\) \(f_A\) A surviving juvenile matures \(T_J\) \(\psi_J\) A maturing juvenile becomes amictic \(A_J\) \(1-m\) A maturing juvenile becomes mictic \(1-A_J\) \(m\) \(f_A\) counts only the newborns still alive at the next count, so their survival is already in it:
\[f_A = S_J F_A\]
The slides’ \(F_A\) counts all newborns and multiplies by \(S_J\), assuming that newborns survive as well as older juveniles.
From P5 on, this arrow is called \(R_A\) (recruitment), as in the lectures. There \(f_A\) means all newborns per adult, and \(R_A = s_0 f_A\), with \(s_0\) the chance that a newborn lives until the next count. The \(f_A\) in this worksheet is that \(R_A\).
Which formulas, when? Your tubes started with one stage, so day 1 to 2 uses Question 3. By day 2 the tubes are mixed, so day 2 to 3 uses Question 2.
Mixed tube. On day \(t+1\), juveniles are survivors plus newborns, and adults are survivors plus newly matured juveniles. Live counts cannot separate them, so survival needs the dead (\(D\)):
\[s_J = 1 - \frac{D_J}{J_t} \qquad s_A = 1 - \frac{D_A}{A_t}\]
and every other rate builds on these:
\[\psi_J = \frac{A_{t+1} + M_{t+1} - A_t s_A - M_t s_M}{J_t\, s_J} \qquad f_A = \frac{J_{t+1} - J_t s_J (1-\psi_J)}{A_t}\]
with \(m\) the newly matured mictic adults over all newly matured adults. \(f_A\) here is the recruitment \(R_A\) of P5.
Single-stage tubes. Every rate comes from live animals. Adult-only tube:
\[s_A = \frac{A_{t+1}}{A_t} \qquad f_A = \frac{J_{t+1}}{A_t}\]
Juvenile-only tube, where everyone alive on day \(t+1\) is a survivor (\(N_{t+1} = J_{t+1} + A_{t+1} + M_{t+1}\)):
\[s_J = \frac{N_{t+1}}{J_t} \qquad \psi_J = \frac{A_{t+1} + M_{t+1}}{N_{t+1}} \qquad m = \frac{M_{t+1}}{A_{t+1} + M_{t+1}}\]
\(N_{t+1}\) is every animal alive on day \(t+1\): the juveniles that have not matured yet, plus the new adults. So \(\psi_J\) is the survivors that matured, divided by all survivors.
What these formulas assume.
- Both designs: a juvenile cannot mature and reproduce on the same day, and a newborn never looks adult at the next count.
- Adult-only tubes: why are dead juveniles left out? They were born and died between the two counts. \(f_A\) counts only newborns still alive at the next count, so they do not belong in it. Example: 6 adults leave 12 live and 3 dead juveniles. Then \(f_A = 12/6 = 2\). All births found, \(15/6 = 2.5\), would be the slides’ \(F_A\), if every dead juvenile was found.
- Mixed tubes: every dead juvenile is taken to be an old one. It could also be a newborn, and the counts of a mixed tube cannot tell. If some were newborns, \(s_J\) comes out too low, and \(f_A\) and \(\psi_J\) too high.
The adult-only tubes can help (Daniel’s idea): every dead juvenile there is a newborn. Divide them by the adults that started the tube, \(d = D_J / A_t\) (day 1 to 2). In a mixed tube (day 2 to 3), expect \(d \times A_t\) dead newborns and subtract them:
\[s_J = 1 - \frac{D_J - d\,A_t}{J_t}\]
Example: 3 dead newborns from 6 adults, so \(d = 0.5\). A mixed tube with 4 adults and 5 dead juveniles should have about 2 dead newborns, which leaves 3 old ones.
What it assumes: \(d\) is the same on both days, and the same share of dead newborns is found. Add up the tubes of a treatment first: in a single tube, chance can make \(D_J - d\,A_t\) negative. Old juveniles that died and were missed are still not corrected for.
- Mixed tubes: every dead animal is found. A missed one counts as a survivor, so \(s_J\) and \(s_A\) come out too high. This error goes the other way.
Often missed.
- The entry juvenile ← amictic is \(f_A\) alone. Several answers wrote \(s_J f_A\), which counts the newborns’ survival twice.
- In a mixed tube, \(\psi_J\) is newly matured adults over surviving juveniles, \(J_t s_J\). It is not over all animals counted on day \(t+1\): those include old adults and newborns. And “newly matured” is not just adults now minus adults before, because some of the old adults died.
- In a mixed tube, \(m\) also counts only the newly matured adults, not all adults.
- In single-stage tubes, use the live counts. \(s_J\) is everyone alive (\(J+A+M\)) over \(J_t\), not \(J_{t+1}/J_t\): a juvenile that matured has survived too.
Simulate first: does the design give back the rates?
Dead rotifers are small, and some disintegrate or are missed. Test both designs on a simulated tube where you know the true rates (close to the 2025 estimates for the 1950s population without copper), and where each dead animal is found with probability 0.8.
truth <- c(s_J = 0.95, psi_J = 0.9, m = 0.45, s_A = 0.5, s_M = 0.8, f_A = 2.7)
p_found <- 0.8
one_day <- function(J, A, r = truth) {
surv_J <- rbinom(1, J, r[["s_J"]])
mature <- rbinom(1, surv_J, r[["psi_J"]])
mictic <- rbinom(1, mature, r[["m"]])
surv_A <- rbinom(1, A, r[["s_A"]])
births <- rpois(1, A * r[["f_A"]])
c(J1 = surv_J - mature + births, A1 = surv_A + mature - mictic, M1 = mictic,
dead_J = rbinom(1, J - surv_J, p_found), dead_A = rbinom(1, A - surv_A, p_found))
}
set.seed(1)
one_day(J = 5, A = 3) J1 A1 M1 dead_J dead_A
6 6 2 0 0
The function follows one tube through one day and returns the next day’s counts. Below, the 2025 estimators for a mixed tube, and the ones for single-stage tubes from Question 3, are applied to the same treatment: 7 mixed tubes of 5 juveniles and 3 adults, or 4 juvenile tubes and 3 adult tubes of 8, counts summed over tubes as in 2025.
mixed <- function() {
d <- rowSums(replicate(7, one_day(J = 5, A = 3)))
J0 <- 35; A0 <- 21
s_J <- 1 - d[["dead_J"]] / J0
s_A <- 1 - d[["dead_A"]] / A0
psi_J <- (d[["A1"]] + d[["M1"]] - A0 * s_A) / (J0 * s_J)
f_A <- (d[["J1"]] - J0 * s_J * (1 - psi_J)) / A0
c(s_J = s_J, psi_J = psi_J, s_A = s_A, f_A = f_A)
}
single <- function() {
j <- rowSums(replicate(4, one_day(J = 8, A = 0)))
a <- rowSums(replicate(3, one_day(J = 0, A = 8)))
alive_j <- j[["J1"]] + j[["A1"]] + j[["M1"]]
c(s_J = alive_j / 32, psi_J = (j[["A1"]] + j[["M1"]]) / alive_j,
s_A = a[["A1"]] / 24, f_A = a[["J1"]] / 24)
}
set.seed(2)
sims <- bind_rows(
as_tibble(t(replicate(1000, mixed()))) |> mutate(design = "mixed tubes (2025)"),
as_tibble(t(replicate(1000, single()))) |> mutate(design = "single-stage tubes")
) |>
pivot_longer(-design, names_to = "rate", values_to = "estimate")
ggplot(sims, aes(x = estimate, fill = design)) +
geom_histogram(bins = 40, position = "identity", alpha = 0.6) +
geom_vline(data = tibble(rate = names(truth[c("s_J", "psi_J", "s_A", "f_A")]),
value = truth[c("s_J", "psi_J", "s_A", "f_A")]),
aes(xintercept = value), linetype = "dashed") +
facet_wrap(~ rate, scales = "free") +
labs(x = "Estimate from one simulated treatment", y = "Simulations", fill = NULL) +
theme(legend.position = "bottom")- Which design gives back the true rates (dashed lines), and which is biased? Why, in a sentence each?
- How large is the error of the mixed design in each rate? Use the means and standard deviations of the simulated estimates.
- Change
p_foundto 1 and run again. What happens to the mixed design? What does that tell you about where its problem lies? - What would you check in the lab this afternoon to make your own estimates trustworthy?
Your answers:
# your code hereSolution.
sims |>
group_by(design, rate) |>
summarise(mean = mean(estimate), sd = sd(estimate), .groups = "drop")# A tibble: 8 × 4
design rate mean sd
<chr> <chr> <dbl> <dbl>
1 mixed tubes (2025) f_A 2.60 0.384
2 mixed tubes (2025) psi_J 0.826 0.0666
3 mixed tubes (2025) s_A 0.605 0.106
4 mixed tubes (2025) s_J 0.960 0.0332
5 single-stage tubes f_A 2.70 0.337
6 single-stage tubes psi_J 0.899 0.0549
7 single-stage tubes s_A 0.498 0.102
8 single-stage tubes s_J 0.95 0.0383
Single-stage tubes recover the true rates: every rate comes from live animals. Mixed tubes are biased: a missed dead animal counts as a survivor, and the error carries on.
- Too many surviving adults → too few newly matured ones → maturation too low.
- Too many surviving juveniles → too few newborns → fecundity too low.
The mixed design’s errors:
- adult survival about 0.6 instead of 0.5;
- maturation about 0.83 instead of 0.9;
- fecundity slightly low; juvenile survival hardly affected, as few juveniles die.
The spread is similar in both designs, so this is bias, not imprecision: more tubes would not fix it.
Often missed. The error asked for is the bias: the mean estimate minus the true value, for the mixed tubes alone. The standard error, sd/√n, says only how precisely 100 simulations give the mean, not whether that mean is right. Averaging the two designs together hides the bias. So does setting
p_foundto 1 before answering question 2.With every dead animal found, the mixed design is unbiased too, in this simulation. Its problem is its dependence on finding every dead animal. Real tubes have a second one: dead newborns are counted as dead old juveniles. The simulation leaves them out, because its births are only the newborns still alive at the count.
Search each tube for dead animals before pouring it out; check counts that look impossible before returning the tubes; note where you were unsure (P5 asks).
A function for your counts
Write a function that takes the counts of one tube or treatment (live on day \(t\); live and dead on day \(t+1\), for the three stages) and returns the six rates, so that you can apply it to this afternoon’s and tomorrow’s counts in P5.
rotifer_rates <- function(J0, A0, M0, J1, A1, M1, dead_J, dead_A, dead_M) {
# your code here
}Solution. The tubes started with one stage: use the formulas of Question 3 from day 1 to day 2, and those of Question 2 from day 2 to day 3, when the tubes are mixed. The function below is the one for mixed tubes. P5 provides the counts in the same layout.
rotifer_rates <- function(J0, A0, M0, J1, A1, M1, dead_J, dead_A, dead_M) {
s_J <- 1 - dead_J / J0
s_A <- 1 - dead_A / A0
s_M <- if (M0 > 0) 1 - dead_M / M0 else NA
matured <- A1 + M1 - A0 * s_A - M0 * ifelse(is.na(s_M), 0, s_M)
psi_J <- matured / (J0 * s_J)
m <- (M1 - M0 * ifelse(is.na(s_M), 0, s_M)) / matured
f_A <- (J1 - J0 * s_J * (1 - psi_J)) / A0
c(s_J = s_J, psi_J = psi_J, m = m, s_A = s_A, s_M = s_M, f_A = f_A)
}
rotifer_rates(J0 = 35, A0 = 21, M0 = 0, J1 = 63, A1 = 38, M1 = 10, dead_J = 0, dead_A = 3, dead_M = 0) s_J psi_J m s_A s_M f_A
1.0000000 0.8571429 0.3333333 0.8571429 NA 2.7619048
These are the 2025 counts for the 1950s population, no copper, constant temperature, day 1 to day 2. Compare them with the team’s Bayesian estimates for the same treatment:
| Rate | From these counts | Bayesian estimate |
|---|---|---|
| adult survival \(s_A\) | 0.86 | 0.50 |
| juvenile survival \(s_J\) | 1 (no dead juvenile found) | 0.96 |
Survival too high: the pattern the simulation predicts when dead animals are missed.
Often missed. With no mictic adults on day \(t\) (M0 = 0), 1 - dead_M / M0 is 0/0. R returns NaN, and it spreads to \(\psi_J\), \(m\) and \(f_A\). So the function has to treat M0 = 0 separately. The order matters as well: psi_J must be calculated before f_A, which uses it. Test a function on counts before you need it.
Part 3 — Teasel seeds from real counts
In L03 you read Werner and Caswell’s teasel matrix for Field A. Now you build one for Field L, another of their eight old fields in Michigan, from counts. Same life cycle as L03 (Slide 24): dormant seeds in their first and second year, small, medium and large rosettes, flowering plants; one census a year, in August.
Werner sowed 3,900 seeds into each field in the winter of 1968–69 and recorded which spring each seedling appeared (Werner 1977). The file gives his counts, scaled to 1,000 seeds per field:
germination <- read_csv("data/teasel-seed-germination.csv", comment = "#")
germination# A tibble: 8 × 4
field germinated_first_spring germinated_second_spring never_germinated
<chr> <dbl> <dbl> <dbl>
1 J 577 5 418
2 K 200 34 766
3 L 570 9 421
4 M 366 15 619
5 A 252 29 719
6 B 239 6 755
7 C 244 52 704
8 D 433 53 514
- For Field L: of 1,000 seeds, how many were still in the soil after the first spring? That share is the chance that a newly shed seed becomes a dormant seed in its first year.
- Of those dormant seeds, what share germinated in the second spring? Werner recorded second-year seedlings as small rosettes, so this is the arrow from dormant 1 to small rosettes.
- Of the dormant seeds that did not germinate in the second spring, what share survived as seeds into a second dormant year? What do you have to assume? Why might your number be too high?
- Compare Field L with Field A. What is different about their seeds?
Your answers:
# your code hereSolution.
L <- filter(germination, field == "L")
dormant_share <- 1 - L$germinated_first_spring / 1000 # 0.430
d1_to_small <- L$germinated_second_spring / (1000 - L$germinated_first_spring) # 9 / 430
d1_to_d2 <- L$never_germinated / (1000 - L$germinated_first_spring) # 421 / 430
c(dormant_share = dormant_share, d1_to_small = d1_to_small, d1_to_d2 = d1_to_d2)dormant_share d1_to_small d1_to_d2
0.43000000 0.02093023 0.97906977
- 430 of 1,000 seeds had not germinated after the first spring: 0.43.
- 9 of those 430 germinated in the second spring: 0.021, exactly Werner and Caswell’s published entry.
- 421 of 430 = 0.979, if every seed that did not germinate was still alive. Dead and dormant seeds look the same, so 0.979 is an upper limit; Werner and Caswell used 0.970.
- By the third spring almost nothing germinated (below 0.1; Werner 1977, p. 842), so the model ends the seed bank after two years.
- Dormant 2 → small rosettes (0.005) came from separate observations; we use their value below.
- Field L’s seeds germinate at once (570 of 1,000 in the first spring, against 252 in Field A), so few stay dormant (0.43 against 0.75). The same species makes a small seed bank in one field and a large one in the next.
Often missed. The 421 seeds are not “all of them” (100%): the share is of the 430 that were dormant, 421/430 = 0.979. To compare the second spring in the two fields, divide by the seeds still in the soil: 9/430 = 0.02 in Field L, 29/748 = 0.04 in Field A.
Part 4 — Teasel rosettes from counts
Werner measured every rosette each August and recorded its fate a year later: dead, a rosette of some size, or flowering. The next file pools Field L’s rosettes over plots and years. (These counts are simulated from Werner and Caswell’s published rates for Field L, with sample sizes like theirs, so that you can check your estimates against the truth at the end.)
rosettes <- read_csv("data/teasel-L-rosette-fates.csv")
rosettes# A tibble: 15 × 3
stage fate n
<chr> <chr> <dbl>
1 small died 116
2 small small 0
3 small medium 35
4 small large 9
5 small flowering 0
6 medium died 219
7 medium small 0
8 medium medium 88
9 medium large 32
10 medium flowering 1
11 large died 21
12 large small 0
13 large medium 0
14 large large 12
15 large flowering 37
- Turn the counts into transition probabilities: for each starting stage, the share of rosettes that ended in each fate. Do the shares in each stage add up to 1, including those that died?
- Which arrows of the L03 graph have no rosettes in Field L? Is a zero here the same as an arrow that cannot exist?
Your answers:
# your code hereSolution.
transitions <- rosettes |>
group_by(stage) |>
mutate(p = n / sum(n)) |>
ungroup()
transitions |>
select(stage, fate, p) |>
pivot_wider(names_from = stage, values_from = p)# A tibble: 5 × 4
fate small medium large
<chr> <dbl> <dbl> <dbl>
1 died 0.725 0.644 0.3
2 small 0 0 0
3 medium 0.219 0.259 0
4 large 0.0562 0.0941 0.171
5 flowering 0 0.00294 0.529
- Each stage adds up to 1, including the dead. In the matrix the dead drop out, so a column adds up to less than 1.
- Small rosettes never stayed small and never flowered; medium rosettes almost never flowered (1 of 340).
- The first zero is probably real: in Field L, small rosettes either grew or died.
- But a 0 in a sample can also be a rare arrow. The true medium → flowering probability is 0.002; a sample of 340 rosettes catches it only about half the time.
In R: rosettes has 15 rows, and R prints only the first 10, so the large rosettes seem to be missing. They are there: print(rosettes, n = Inf).
Reproduction
A flowering plant contributes to four stages at the next August count: dormant seeds and small, medium and large rosettes (L03, Slides 9 and 24). Each entry is seeds per flowering plant × the share of shed seeds that end in that stage. Two more files:
seed_heads <- read_csv("data/teasel-L-seed-heads.csv") # seeds produced by each flowering plant
new_seeds <- read_csv("data/teasel-L-new-seeds.csv") # where 2,000 shed seeds were at the next count
summary(seed_heads$seeds) Min. 1st Qu. Median Mean 3rd Qu. Max.
87.0 356.5 480.5 533.7 680.8 1353.0
new_seeds# A tibble: 1 × 5
seeds_shed small medium large dormant
<dbl> <dbl> <dbl> <dbl> <dbl>
1 2000 27 62 0 863
Compute the four reproduction entries of Field L. Why can one of them be in the hundreds when every other entry in the matrix is at most 1?
Your answer:
# your code hereSolution.
seeds_per_plant <- mean(seed_heads$seeds)
shares <- c(dormant_1 = new_seeds$dormant, small = new_seeds$small,
medium = new_seeds$medium, large = new_seeds$large) / new_seeds$seeds_shed
reproduction <- seeds_per_plant * shares
round(reproduction, 2)dormant_1 small medium large
230.30 7.21 16.55 0.00
- A flowering plant produced about 534 seeds, and 43% of shed seeds were dormant by the next count: about 230 dormant seeds per flowering plant.
- A reproduction entry counts offspring per parent. It is not a probability, so it can be large.
- The dormant share (0.43) matches Werner’s sown seeds in Part 3: the same quantity, measured twice.
The matrix
Field A grew at λ = 2.33 (L03, Slide 9). Field L’s seeds germinate faster and its rosettes grow more slowly. Higher or lower?
Your prediction:
Assemble Field L’s matrix from Parts 3 and 3, in the order of L03 Slide 13, and compute λ. Then load Field A’s matrix (the file from P2) and compare them entry by entry.
stages <- c("dormant_1", "dormant_2", "small", "medium", "large", "flowering")
A_L <- matrix(0, 6, 6, dimnames = list(to = stages, from = stages))
# your code here: fill A_L["to", "from"] entry by entrySolution.
p <- function(from, to) transitions$p[transitions$stage == from & transitions$fate == to]
A_L["dormant_2", "dormant_1"] <- d1_to_d2
A_L["small", "dormant_1"] <- d1_to_small
A_L["small", "dormant_2"] <- 0.005 # Werner and Caswell's value
for (from in c("small", "medium", "large"))
for (to in c("small", "medium", "large", "flowering")) A_L[to, from] <- p(from, to)
A_L[c("dormant_1", "small", "medium", "large"), "flowering"] <- reproduction
round(A_L, 3) from
to dormant_1 dormant_2 small medium large flowering
dormant_1 0.000 0.000 0.000 0.000 0.000 230.296
dormant_2 0.979 0.000 0.000 0.000 0.000 0.000
small 0.021 0.005 0.000 0.000 0.000 7.205
medium 0.000 0.000 0.219 0.259 0.000 16.545
large 0.000 0.000 0.056 0.094 0.171 0.000
flowering 0.000 0.000 0.000 0.003 0.529 0.000
dominant_lambda(A_L)[1] 1.230082
A_A <- read_csv("data/teasel-matrix.csv", comment = "#") |>
select(-to) |>
as.matrix()
dimnames(A_A) <- list(to = stages, from = stages)
dominant_lambda(A_A)[1] 2.33388
round(A_L - A_A, 3) from
to dormant_1 dormant_2 small medium large flowering
dormant_1 0.000 0.000 0.000 0.000 0.000 -92.084
dormant_2 0.013 0.000 0.000 0.000 0.000 0.000
small 0.008 -0.005 -0.125 0.000 0.000 3.757
medium -0.007 0.000 0.094 0.021 0.000 -13.625
large -0.008 0.000 0.018 -0.151 0.004 -0.862
flowering 0.000 0.000 0.000 -0.020 -0.221 0.000
- Field L grows at λ ≈ 1.23, far slower than Field A (2.33).
- The biggest differences: medium rosettes grow into large ones less often (about 0.09 against 0.245), and fewer seeds stay dormant.
- The published Field L matrix gives λ = 1.26. Your estimate differs only by sampling error, since the counts were drawn from it.
- Which differences matter most for λ is what an LTRE answers (L05, P4).
Often missed.
- Many expected a higher λ because the seeds germinate faster. The slower rosettes matter more. Why is the question of P4.
- The two seed columns are easy to mix up. Dormant 1 → small is 9/430 and dormant 1 → dormant 2 is 421/430. The shares in
new_seedsare for newly shed seeds, so they belong only in the flowering column, multiplied by seeds per plant. - Dormant 2 → small (0.005) is not in your files; we took it from Werner and Caswell. With 0 there, λ is 1.22 instead of 1.23: hardly a difference.
Part 5 — Check your own matrix
Published matrices contain recurring mistakes (Kendall et al. 2019, in Stevens’ Primer of Ecology with R). Run through the list on your Field L matrix:
- Does every column except the flowering plants’ add up to at most 1? (Survival and transitions cannot create individuals.)
- Is there a delay in reproduction that the plant does not have? Follow the arrows from a flowering plant to the next year’s rosettes: one year or two? (L03, Slide 9: Caswell’s own published error.)
- Does every reproduction entry include what has to happen before the next count? Here: seeds per plant × the share that is a dormant seed or a rosette by August.
- Stages that last several years: can a rosette stay in its stage, and can it skip one? Is the stay entry estimated, or forgotten?
- Does the seed bank end where the data say it ends (Part 3)?
Your answers:
colSums(A_L[, stages != "flowering"])dormant_1 dormant_2 small medium large
1.0000000 0.0050000 0.2750000 0.3558824 0.7000000
Solution.
The rosette columns add up to less than 1; the missing part is the share that dies. The dormant 1 column adds up to exactly 1: Part 3 assumed that no dormant seed dies, which is the upper limit noted there.
One year: flowering plants contribute directly to dormant seeds and rosettes at the next count; there is no “seeds” stage in between.
What questions 2 and 3 ask was unclear to some. Question 2: is there an extra step in the matrix, so that a plant’s offspring need two years to become rosettes when in the field they need one? Question 3: did you multiply the seeds by the share still there at the next count?
Yes, each reproduction entry is seeds per plant × the share in that stage by August, which already includes the losses of seeds and seedlings.
Medium and large rosettes can stay; small rosettes did not stay in Field L; small → large is a skip.
Dormant 2 has no arrow back to itself: after two winters, a seed that has not germinated leaves the model.
Wrap-up
- The owl’s λ did not change with the census, but its matrix did. What does that mean for reading a published matrix?
- Which entries of your teasel matrix rest on the weakest data, and why?
- What is the one thing you will do differently at the bench because of Part 2?
Your answers:
Solution.
- An entry means nothing without its census: before comparing two matrices, or using one, find out when the population was counted.
- The dormant seeds (dead and dormant seeds cannot be told apart, so dormant 1 → dormant 2 is an upper limit), the rare arrows (medium → flowering from one plant in 340), and the second-year seed germination (9 seedlings).
- Looking for the dead before pouring out a tube, and checking impossible counts on the spot.
What was unclear, too long, redundant or missing?
Your feedback:
Before you leave. Render this file and upload it as Lastname_P03.html to your Participant Drop Box in OLAT.
Next. This afternoon (E2) you count the rotifers; tomorrow morning L04 projects a matrix forward, and in the afternoon (E3) you count again. On Friday, P4 asks which rates matter most for λ, and compares Field L with Field A.
Sources. Owl rates: Lande (1988), Oecologia 75:601–607, via Caswell (1989), Example 7.4. Teasel: Werner (1977), Ecology 58:840–849, Table 2 (seed germination, real counts); Werner and Caswell (1977), Ecology 58:1103–1111, Table 3 (Field L rates, from which the rosette, seed-head and new-seed counts were simulated; make-data.R in the course repository); Field A with the seed stage removed as in Caswell (1989), p. 49, and small → large as in the 1977 paper. Common mistakes: Kendall et al. (2019), Ecological Modelling 406:33–43. Census timing: Oli (2024), Wildlife Population Ecology: A Practical Guide. Rotifer rates: the 2025 Bayesian estimates of the course team.