I have birthing data on a particular type of whale. I’m trying to figure out how many years it takes to get to the next birth event, given that it just gave birth. Every year, researchers go out at a particular site in the ocean to observe whales. In any year, whales are spotted with a calf, indicating they gave birth. They could also be spotted to be alone, indicating they did not give birth. However, sometimes whales aren’t spotted for whatever reason (e.g. moved to a different ocean, which might still mean they could have given birth, etc.). It’s been proposed that the birthing interval be thought of as binomially distributed. However, I’m not sure how to take the censoring into account via PyMC3. Any thoughts on how to do this?
Here’s my thought process to get a frequentist MLE estimate through optimization.
Find all the whales that we have observed to have given birth.
Produce data given some proposed parameters. For an individual, we start out at the earliest birth event, then we keep generating birth events until we reach the end of the window of observation. We do this for all the individuals.
For the simulated data, we only look at the times that the whales were actually observed (so we discard parts of the simulated data where whales weren’t actually observed).
Find the error between the simulated data and the observed data. Currently, I’m using the mean squared error of the number of times births were observed in the span of time compared to the actual.
Do 4 a bunch of times to get an aggregate measure of fit given the specified parameters.
Do a brute-force search (repeating steps 2-5) through a space of possibilities to find parameters that fit best with the given data.
The nice thing about the above approach is that sample data from the best-fit distribution seems to align closely with the actual data. However, the problem with this approach is that it only gives me a point estimate; I would ideally want some sort of credible interval because we would like to compare distributions across time (i.e. are whales at this certain area reproducing less often compared to before?).
Any help would be very appreciated! Thanks.