Why Germination Percentage Can Mislead: Time-to-Germination Analysis in R

Same germination percentage, different timing in Prosopis seed treatments

The question: what does a final percentage hide?

Two dishes may finish with the same germination percentage but take different amounts of time to reach that endpoint. For seed vigor and experimental interpretation, when germination occurs matters. This lesson uses historical Prosopis juliflora laboratory data to contrast endpoint germination and observed inspection-time patterns without treating all individual seeds as independently randomized treatment replicates.

The raw table has 80 experimental units: four replicates for each combination of four incubation temperatures (25, 30, 35, 40 °C) and five recorded NaCl codes (0, 0.5, 1, 1.5, 2). Each unit began with 50 seeds. The values in D0 through D10 are numbers of newly germinated seeds at each inspection, not cumulative counts. The recorded NaCl codes are nonnegative even though osmotic potential may conventionally be written as negative MPa; we do not silently infer or reverse the physical sign from the CSV.

What you will learn: import and check inspection-count data; calculate cumulative germination and waiting-time summaries; distinguish a germination event from a non-event at the observation deadline; show a real endpoint/timing counterexample; and quantify uncertainty by resampling whole dishes.

1. Import and audit the fieldbook

The experimental unit is the 50-seed dish, not a seed treated as if it had its own independent assignment. Integrity checks protect against repeated keys, missing values and daily totals exceeding the number sown. The checks below guard against impossible counts and accidental duplicate experimental units.

# 1. Import and check the observed seed counts
if (!requireNamespace("ggplot2", quietly = TRUE)) {
  stop("Install ggplot2 first: install.packages('ggplot2')")
}

seeds <- read.csv("01_data/prosopis_germination.csv", check.names = FALSE)
days <- 0:10
day_cols <- paste0("D", days)
required <- c("rep", "nacl", "temp", "seeds", day_cols)

if (!identical(names(seeds), required) || nrow(seeds) != 80L) {
  stop("Unexpected source dimensions or column names; check the source CSV.")
}
if (anyNA(seeds) || !all(vapply(seeds, is.numeric, logical(1)))) {
  stop("The source must contain complete numeric observations.")
}
if (anyDuplicated(seeds[c("nacl", "temp", "rep")])) {
  stop("Repeated treatment-by-replicate experimental-unit key.")
}
if (!all(seeds$seeds == 50) || any(seeds[day_cols] < 0) ||
    any(as.matrix(seeds[day_cols]) != floor(as.matrix(seeds[day_cols])))) {
  stop("Invalid seed total or daily germination count.")
}
if (any(rowSums(seeds[day_cols]) > seeds$seeds)) {
  stop("At least one dish germinated more seeds than were sown.")
}
if (!all(table(seeds$temp, seeds$nacl) == 4L)) {
  stop("Expected four experimental units per temperature-by-NaCl combination.")
}

These integrity checks precede statistical summaries. They confirm the intended unit of replication and protect the calculations from impossible germination totals.

2. Translate daily counts into interpretable outcomes

Let gid be the number of seeds newly observed to germinate on inspection day d in dish i, and ni the number sown. The observed cumulative percentage is

Gi(t) = 100 (∑d=0t gid) / ni.

For dishes with at least one recorded germination, the conditional observed mean germination day is (∑d d gid) / (∑d gid). This conditions on germination: dishes with no observed germinations do not have that mean, rather than being assigned an artificial value of zero.

A complementary restricted mean days without germination is the area under the not-yet-germinated fraction on the daily inspection grid, here ∑d=09 [1 − Gi(d)/100]. An event on day 1 contributes one day; a seed never observed to germinate by the end contributes ten. It captures both speed and non-germination over the measured window. It is not a survival model fitted to exact individual event times.

# 2. Summarize timing without inventing individual-seed event times
counts <- as.matrix(seeds[day_cols])
cumulative <- t(apply(counts, 1, cumsum))
observed <- rowSums(counts)
weighted_days <- as.vector(counts %*% days)

unit <- data.frame(
  temp = seeds$temp, nacl = seeds$nacl, rep = seeds$rep,
  seeds = seeds$seeds, germinated = observed,
  not_germinated = seeds$seeds - observed,
  final_pct = 100 * observed / seeds$seeds,
  germ_day_sum = weighted_days,
  mean_day_germinated = ifelse(observed > 0, weighted_days / observed, NA_real_),
  restricted_wait_days = rowSums(1 - cumulative[, 1:10] / seeds$seeds)
)

stopifnot(sum(unit$germinated) == 3390L,
          sum(unit$not_germinated) == 610L,
          all(unit$restricted_wait_days >= 0 & unit$restricted_wait_days <= 10))

3. Reconstruct cumulative curves and treatment summaries

Group-level curves pool numerators and denominators for descriptive plotting, while each dish remains a distinct replicate for uncertainty. The risk set immediately before a daily inspection is the number not previously recorded as germinated. The conditional event fraction for that interval can be undefined once that risk set reaches zero; this is not a data error.

# 3. Plot-ready inspection counts; D0-D10 are new germinations, not cumulative
long <- data.frame(
  temp = rep(seeds$temp, each = length(days)),
  nacl = rep(seeds$nacl, each = length(days)),
  rep = rep(seeds$rep, each = length(days)),
  seeds = rep(seeds$seeds, each = length(days)),
  day = rep(days, times = nrow(seeds)),
  new = as.vector(t(counts)),
  cumulative = as.vector(t(cumulative))
)
previous <- cbind(0, cumulative[, -ncol(cumulative), drop = FALSE])
long$at_risk <- as.vector(t(seeds$seeds - previous))
long$empirical_hazard <- ifelse(long$at_risk > 0,
                               long$new / long$at_risk, NA_real_)

curves <- aggregate(cbind(cumulative, seeds) ~ temp + nacl + day,
                    data = long, FUN = sum)
curves$cumulative_pct <- 100 * curves$cumulative / curves$seeds

condition <- aggregate(cbind(seeds, germinated, germ_day_sum,
                             restricted_wait_days) ~ temp + nacl,
                       data = unit, FUN = sum)
dish_n <- aggregate(rep ~ temp + nacl, data = unit, FUN = length)
condition$n_dishes <- dish_n$rep
condition$final_pct <- 100 * condition$germinated / condition$seeds
condition$mean_day_germinated <- ifelse(condition$germinated > 0,
  condition$germ_day_sum / condition$germinated, NA_real_)
condition$restricted_wait_days <- condition$restricted_wait_days / condition$n_dishes

at_day3 <- subset(curves, day == 3)
key <- paste(condition$temp, condition$nacl)
condition$day3_pct <- at_day3$cumulative_pct[
  match(key, paste(at_day3$temp, at_day3$nacl))]
stopifnot(all(!is.na(condition$day3_pct)),
          all(condition$day3_pct <= condition$final_pct))
Observed treatment summaries computed from the original 80 dishes
Temp °C NaCl code Dishes Final % Day 3 % Observed mean day Restricted wait (days)
25 0.0 4 100.0 100.0 1.24 1.24
30 0.0 4 100.0 100.0 1.03 1.03
35 0.0 4 100.0 100.0 1.01 1.02
40 0.0 4 100.0 100.0 1.03 1.04
25 0.5 4 100.0 98.5 1.83 1.83
30 0.5 4 100.0 100.0 1.10 1.10
35 0.5 4 98.0 98.0 1.08 1.26
40 0.5 4 96.0 96.0 2.33 2.64
25 1.0 4 96.0 76.0 2.70 3.00
30 1.0 4 98.5 98.5 1.90 2.02
35 1.0 4 96.0 96.0 1.81 2.14
40 1.0 4 98.5 87.5 2.73 2.84
25 1.5 4 96.0 11.5 5.44 5.62
30 1.5 4 98.5 86.0 2.99 3.10
35 1.5 4 98.5 55.5 3.37 3.47
40 1.5 4 10.5 5.0 3.29 9.30
25 2.0 4 94.5 0.5 6.52 6.72
30 2.0 4 94.0 9.0 4.39 4.72
35 2.0 4 20.0 0.5 7.00 9.40
40 2.0 4 0.0 0.0 NA 10.00

The full treatment grid reveals why a single endpoint conceals multiple phenomena. At 40 °C and recorded NaCl code 2, zero of 200 seeds were observed to germinate by day 10, so the conditional mean day is undefined. At the same temperature and code 1.5, 21 of 200 seeds (10.5%) germinated. By comparison, code 2 at 30 °C reached 188 of 200 seeds (94%). These contrasts describe a temperature-dependent pattern in the laboratory data, not proof of an underlying physiological pathway. The NaCl values are retained as source codes until their physical sign convention is independently verified.

4. The real counterexample: identical endpoints, different schedules

The clearest test of whether endpoint percentage is sufficient is a pair of conditions with the same endpoint. Among the four dishes per treatment at 25 °C, all 200 seeds in each treatment ultimately germinated; the paths to that endpoint were not the same.

For a clear but cautious uncertainty illustration, we bootstrap four whole dishes per condition, not 200 seeds per condition. This yields a descriptive difference in dish-mean observed days (code 0.5 minus 0), with a percentile bootstrap interval. Four replicates are few: treat the interval as an exploratory precision summary rather than an automatic significance or field recommendation.

# 4. Resample whole dishes, never individual seeds, for uncertainty
focus <- subset(unit, temp == 25 & nacl %in% c(0, 0.5))
if (nrow(focus) != 8L || any(is.na(focus$mean_day_germinated))) {
  stop("The teaching contrast requires four germinating dishes per group.")
}
focus_means <- aggregate(cbind(final_pct, mean_day_germinated) ~ nacl,
                         data = focus, FUN = mean)
focus_means$n_dishes <- 4L
if (!all(focus_means$final_pct == 100)) {
  stop("The focus groups no longer have matching complete endpoints.")
}

x0 <- focus$mean_day_germinated[focus$nacl == 0]
x05 <- focus$mean_day_germinated[focus$nacl == 0.5]
set.seed(20261112)
boot_difference <- replicate(4000L,
  mean(sample(x05, length(x05), replace = TRUE)) -
    mean(sample(x0, length(x0), replace = TRUE)))
limits <- unname(quantile(boot_difference, c(0.025, 0.975)))
contrast <- data.frame(
  temperature_c = 25, comparison = "NaCl 0.5 minus NaCl 0",
  difference_days = mean(x05) - mean(x0),
  bootstrap_low = limits[1], bootstrap_high = limits[2],
  resampling_unit = "experimental dish", dishes_per_group = 4L
)

At 25 °C, code 0 and code 0.5 end at 100% and 100% germination. Their observed mean days are 1.24 and 1.83 respectively. The final percentage alone hides this timing contrast.

Resampling whole dishes: observed timing contrast and exploratory 95% interval
temperature_c comparison difference_days bootstrap_low bootstrap_high resampling_unit dishes_per_group
25 NaCl 0.5 minus NaCl 0 0.59 0.485 0.69 experimental dish 4

The bootstrap contrast is 0.59 days, with percentile endpoints 0.48 to 0.69 days. This reflects variability between recorded units under a within-condition resampling assumption; it does not reconstruct any shared block allocation, rule out unmeasured confounding or recover unknown within-day germination times.

5. How time-to-event reasoning changes the denominator

The daily hazard here is a descriptive fraction: newly germinated seeds divided by seeds not yet observed to germinate at the start of that interval. Unlike a proportion out of all seeds sown, its denominator changes as germination proceeds. On day 1 at 25 °C, code 0 records 156 of 200 newly germinated seeds (78%), versus 42 of 200 (21%) for code 0.5. On day 2, the respective conditional event fractions among those not previously germinated are 40/44 (90.9%) and 153/158 (96.8%). A large day-2 hazard in code 0.5 does not mean it germinated faster overall: its larger risk set largely reflects its slower first day. The inspection labels identify when an event was observed, not its exact continuous time.

# 5. Empirical event fractions are conditional on seeds still ungerminated
focus_hazard <- subset(long, temp == 25 & nacl %in% c(0, 0.5) & day %in% 1:4)
focus_hazard <- aggregate(cbind(new, at_risk) ~ nacl + day,
                          data = focus_hazard, FUN = sum)
focus_hazard$hazard_pct <- ifelse(focus_hazard$at_risk > 0,
  100 * focus_hazard$new / focus_hazard$at_risk, NA_real_)
NaCl codes 0 and 0.5 at 25 °C: empirical inspection-event fractions
nacl day new at_risk hazard_pct
0.0 1 156 200 78.00
0.5 1 42 200 21.00
0.0 2 40 44 90.91
0.5 2 153 158 96.84
0.0 3 4 4 100.00
0.5 3 2 5 40.00
0.0 4 0 0 NA
0.5 4 3 3 100.00

Seeds not recorded germinated by day 10 can be treated as administratively right-censored at the end of observation for descriptive purposes. This does not establish that they were still viable. Daily inspections also mean germination times are interval recorded. A formal continuous-time survival model treating day labels as exact individual event times and all seeds as independent would overstate what these observations contain.

6. Reading the three complementary figures

The first plot displays the treatment trajectories over all eleven inspections. The second shows the actual experimental-unit variability behind the equal-endpoint example. The third places the 10-day restricted waiting summary across the factorial treatment grid. Together they distinguish speed, fraction germinated and unobserved events at the deadline.

# 6. Visualize time courses, real dish replication, and restricted waiting
library(ggplot2)
dir.create("04_outputs/figures", recursive = TRUE, showWarnings = FALSE)
base_theme <- theme_minimal(base_size = 12) +
  theme(legend.position = "bottom", panel.grid.minor = element_blank(),
        plot.title.position = "plot")

p_curves <- ggplot(curves, aes(day, cumulative_pct, color = factor(nacl))) +
  geom_line(linewidth = 0.9) + geom_point(size = 1.3) +
  facet_wrap(~ temp, ncol = 2, labeller = label_both) +
  scale_x_continuous(breaks = 0:10) +
  scale_y_continuous(breaks = seq(0, 100, 25), limits = c(0, 100)) +
  labs(title = "Germination unfolds at different speeds",
       subtitle = "Cumulative percentage from four dishes per treatment",
       x = "Observation day", y = "Cumulative germination (%)",
       color = "NaCl code") + base_theme

ggsave("04_outputs/figures/01_cumulative_curves.png", p_curves,
       width = 10, height = 7, dpi = 300, bg = "white")

focus$stress <- factor(focus$nacl, levels = c(0, 0.5),
                       labels = c("NaCl code 0", "NaCl code 0.5"))
p_focus <- ggplot(focus, aes(stress, mean_day_germinated)) +
  geom_point(position = position_jitter(width = 0.07, height = 0),
             size = 3, alpha = 0.8) +
  stat_summary(fun = mean, geom = "point", shape = 18, size = 4) +
  labs(title = "Identical final germination; different timing",
       subtitle = "25 °C, 100% observed germination in both groups; each dot is a dish",
       x = NULL, y = "Mean observed germination day (among germinated seeds)") +
  base_theme + theme(legend.position = "none")
ggsave("04_outputs/figures/02_equal_endpoint_timing.png", p_focus,
       width = 8, height = 5, dpi = 300, bg = "white")

p_wait <- ggplot(condition, aes(factor(nacl), factor(temp),
                                fill = restricted_wait_days)) +
  geom_tile(color = "white", linewidth = 1) +
  geom_text(aes(label = sprintf("%.1f", restricted_wait_days),
                color = restricted_wait_days < 4.5), size = 4) +
  scale_color_manual(values = c(`TRUE` = "white", `FALSE` = "black"), guide = "none") +
  scale_fill_viridis_c(direction = 1) +
  labs(title = "Mean waiting time over the 10-day observation window",
       subtitle = "Includes seeds not observed to germinate by day 10",
       x = "Recorded NaCl code (physical sign unverified)",
       y = "Temperature (°C)", fill = "Waiting days") + base_theme

ggsave("04_outputs/figures/03_restricted_wait_heatmap.png", p_wait,
       width = 9, height = 5, dpi = 300, bg = "white")
Four temperature panels showing cumulative germination percentage on days zero through ten for five recorded NaCl codes.
Figure 1: Cumulative percentage in the four temperature groups, stratified by recorded NaCl code. The high-code treatments rise slowly at 25 °C; at 40 °C, code 2 has no recorded germination and code 1.5 plateaus at 10.5% by day 10.

A steeper early rise indicates earlier recorded germination, but the lines should not be interpreted as continuous, precisely timestamped emergence events. Pooling four dishes gives a readable curve, not 200 independent experimental replicates.

Two groups of four individual dish points, comparing recorded mean germination day for NaCl codes zero and zero point five.
Figure 2: Each circle is one 50-seed experimental unit at 25 °C; black diamonds are group means. Despite 100% final germination in both groups, the recorded mean day is 1.24 for code 0 and 1.83 for code 0.5.

The visible points are experimental units. A plot showing one dot for each of the 400 individual seeds across these two conditions would falsely suggest hundreds of independent treatment assignments.

Five-by-four heatmap of restricted waiting days across the full factorial combination of NaCl codes and incubation temperatures.
Figure 3: Restricted mean days without observed germination, measured over ten days. The heatmap ranges from about 1 day at low recorded NaCl codes to 10 days at 40 °C with code 2, where none of the 200 seeds germinated by the deadline.

The contrast at 40 °C shows why waiting time and the conditional mean day answer different questions. At code 1.5, the 21 observed germinations average 3.29 inspection days, but the restricted mean waiting measure is 9.30 days once all 179 seeds without a recorded event are included in the 10-day window. At code 2, no conditional mean germination day exists at all, whereas the restricted waiting measure is well defined at 10 days. A high value can reflect late events, many unobserved events, or both; the cumulative curves and endpoint table help separate them.

7. Preserve reproducible scientific outputs

Saving the dish-level summaries, treatment curves, bootstrap contrast and daily hazard table makes the numerical claims inspectable. The three high-resolution figures are also exported for reuse in teaching or reports. The scientific calculations remain traceable to the original inspection counts.

# 7. Save only quantities computed from the original counts
out <- "04_outputs/tables"
dir.create(out, recursive = TRUE, showWarnings = FALSE)
write.csv(unit, file.path(out, "01_dish_summary.csv"), row.names = FALSE)
write.csv(curves, file.path(out, "02_cumulative_curves.csv"), row.names = FALSE)
write.csv(condition, file.path(out, "03_treatment_summary.csv"), row.names = FALSE)
write.csv(focus_means, file.path(out, "04_equal_endpoint_groups.csv"), row.names = FALSE)
write.csv(contrast, file.path(out, "05_dish_bootstrap_contrast.csv"), row.names = FALSE)
write.csv(focus_hazard, file.path(out, "06_inspection_hazards.csv"), row.names = FALSE)
writeLines(capture.output(sessionInfo()), "04_outputs/R_session_info.txt")

cat(sprintf("Observed: %d / %d seeds by D10; %d ungerminated.\n",
            sum(unit$germinated), sum(unit$seeds), sum(unit$not_germinated)))
Observed: 3390 / 4000 seeds by D10; 610 ungerminated.
cat(sprintf("25 °C dish mean timing: code 0 = %.3f, code 0.5 = %.3f days.\n",
            mean(x0), mean(x05)))
25 °C dish mean timing: code 0 = 1.240, code 0.5 = 1.830 days.
cat(sprintf("Dish-bootstrap timing difference: %.3f days [%.3f, %.3f].\n",
            contrast$difference_days, contrast$bootstrap_low, contrast$bootstrap_high))
Dish-bootstrap timing difference: 0.590 days [0.485, 0.690].

Interpretation, assumptions and transfer to a thesis

  • Endpoint versus timing: final percentage alone collapses a daily sequence to one number. At 25 °C, both focus conditions reach 100%, but their conditional means are 1.24 and 1.83 observed inspection days, a descriptive difference of 0.59 day.
  • Experimental-unit inference: the 50 seeds in one dish share an environment and treatment assignment. Treating each as a statistically independent randomized replicate would make intervals artificially narrow.
  • Censoring and measurement: day 10 is the observation cutoff, not proof that ungerminated seeds are dead or dormant. Inspection-day counts are interval observations; precise continuous germination times are unavailable.
  • Historical scope: this public GerminaR table covers a laboratory NaCl experiment from an earlier study, not field yield, emergence, PEG treatment, or contemporary observations. Separate evidence would be needed for field recommendations, a biological mechanism or generalization to other species.
  • Uncertainty: resampling four dishes in each focus treatment yields a descriptive 95% percentile interval from 0.485 to 0.690 days for the timing difference. This is conditional on a small, simple dish-resampling model. The original study describes blocking, which is not reconstructed in this illustrative bootstrap; a block-aware analysis would be preferable if the matching can be verified. Neither this interval nor the visual curves establish universal salinity effects, causal physiology or field emergence performance.

Sources and reproducibility

  1. GerminaR package prosopis documentation: https://rdrr.io/cran/GerminaR/man/prosopis.html.
  2. Miranda, R. D. Q. et al. (2014), Germination of Prosopis juliflora (Sw.) D.C. seeds at different osmotic potentials and temperatures, Plant Species Biology, 29: E9–E20. https://doi.org/10.1111/1442-1984.12025.
  3. Public package’s source RData: https://github.com/cran/GerminaR/blob/master/data/prosopis.rda.
  4. Time-to-event approach for germination experiments: https://pmc.ncbi.nlm.nih.gov/articles/PMC7285257/.
  5. Quarto HTML and execution documentation: https://quarto.org/docs/output-formats/html-basics.html and https://quarto.org/docs/projects/code-execution.html.

Comments