hello!

This seems to me like a good use case for a hurdle model. The Stan documentation has a really nice explanation here.

Hurdle models are among the *many* useful models that can be fit using #interfaces:brms . Here is some quick simulation code to create data like yours and fit a straightforward hurdle model to it:

```
n_plots <- 40
n_acorns_per_plot <- 25
set.seed(1234)
p_plot_logit <- tidybayes::rstudent_t(n_plots, df = 4, mu = 1, sigma = 1.7)
hist(plogis(p_plot_logit))
library(tidyverse)
acorn_plots <- expand.grid(acorn_num = 1:n_acorns_per_plot,
plot_num = 1:n_plots)
acorn_prob <- transform(acorn_plots,
plot_id = paste0("plot",plot_num),
plot_germ = plogis(p_plot_logit[plot_num]))
germination <- transform(acorn_prob,
germinated = rbinom(n_plots * n_acorns_per_plot, 1, plot_germ))
tapply(germination$germinated, germination$plot_id, mean)
sum(germination$germinated)
days_lived <- rpois(n_plots * n_acorns_per_plot, 7)
survival_data <- transform(germination, life = germinated * days_lived)
library(brms)
survival_hurdle_poisson <- brm(bf(life ~ (1 | plot_id),
hu ~ (1 | plot_id),
family = hurdle_poisson(link = "log")),
data = survival_data)
tidybayes::get_variables(survival_hurdle_poisson)
posterior_germination <- tidybayes::spread_draws(survival_hurdle_poisson, b_hu_Intercept, r_plot_id__hu[plot_id,])
library(tidybayes)
library(ggplot2)
posterior_germination %>%
ungroup %>%
mutate(plot_id = forcats::fct_reorder(plot_id, r_plot_id__hu)) %>%
ggplot(aes(y = plot_id, x = r_plot_id__hu + b_hu_Intercept)) + stat_halfeye() +
geom_point(aes(y = plot_id, x = qlogis(1 - plot_germ)), colour = "red", data = survival_data)
```

###
comments / ideas

In order to get a few plots with very low germination, I used a Student T distribution for each plotās baseline germination rate. You can see that the model regularizes the posterior estimates for each plot towards the average.

you might want to correlate the hurdle part (germination success or not) from the survival part (how many days the acorns stay alive) using the syntax `(1 | id | plot_id)`

Iām no expert in survival analysis! I feel like thereās something about the error generated by reducing a continuous lifespan into discrete days, but Iām not sure what.

If some of your seedlings were still alive when you ended the study, then you also need to treat your data as censored (again, something you can do in brms)

You can model variation in survivorship and germination with the same or different predictor variables.

Hope that helps!