Closed athowes closed 2 weeks ago
According to https://mc-stan.org/docs/stan-users-guide/truncation-censoring.html#truncation.section:
We have the code:
family_lpdf(d | mu, sigma) - family_lcdf(obs_time | mu, sigma);
I guess that we could rewrite this as:
family_lpdf(d | mu, sigma) T[0, obs_time];
In some sense, this is nice. It makes it clearer what is going on. In another sense, what is the point? Do we have any way of getting out of the custom functions? Need this to be in brms
.
brms
apparently does allow for both truncation and censoring: https://github.com/paul-buerkner/brms/issues/172
I tried using T[]
in #202 to replace some part of the text in functions.stan
but found it challenging to do and dropped it.
it doesn't support double event censoring. The censoring support with truncation was used in one of the models we showcase in the paper (the uniform approx)
I'd suggest we close this as won't do?
In this package we are injecting custom Stan code to allow us to fit the models we would like to fit.
It would be preferable if we didn't do this, and instead relied on existing Stan or
brms
functionality where exists.We should investigate:
T[]
cens()
(?)