How to fix odd pp_check results?

Hi all,

I’m trying to fit my first brms models and am currently exploring which family would fit my data the best. So far I have tried gaussian, skew_normal and student. My response variable is the number of days it has taken to an individual to flower from the start of an experiment. My model looks like this:

mod <- brm(days_to_flowering ~ Treatment + (Treatment|Accession) + (1|Replicate), data = hpe_greenh, save_pars = save_pars(all = TRUE), family = gaussian(), iter = 4000, warmup = 2000, chain = 4, thin = 2, control = list(adapt_delta = 0.999, max_treedepth = 10), seed = 1) 

The raw response variable looks like this:

And here results from the pp_chech:

Hello Susanna,

Can you explain what is the problem?

Since your response is a count (i.e integer), have you considered using a Poisson or Negative Binomial distribution?

EDIT

I am sorry, I spoke too soon. What I can tell from that abrupt cut there at 160 in your histogram, is that your experiment lasted 160 days. So these are the number of days it took individuals to flower withing the duration of the experiment, presumably with some other individuals not flowering before the end of the experiment?

So you have time-to-event data, with discrete time. This looks like a good place to start.

2 Likes

I second all of this.