Feature request: Add a template for shifted lognormal distribution
Mar-Cald opened this issue · 2 comments
Hello,
I am working with reaction times and I tried to set a shifted lognormal distribution as a prior but got this message:
Error in get_dist_template(the_dist[1]) :
No template for distribution 'dshifted_lnorm'
It would be useful to have an ulam() template for a shifted lognormal distribution.
The label "dshifted_lnorm" comes from brms.
I am using rethinking 2.21
Hi. First, sorry that ulam() doesn't have a template for the shifted log-normal. But does it need one? Isn't shifted log-normal just:
y - d ~ lognormal(mu,sigma)
So in ulam() you could use custom() to define the density:
y ~ custom( lognormal_lpdf(y - d | mu, sigma) )
where d is your positive shift parameter with appropriate prior. Not all of the helper functions will work with a custom() density, but at least that should work until I add a template.
Thanks!