You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Thanks for the issue with definition. This should be relatively easy. You can, of course, just code it in Stan now as
real skew_double_exponential_lpdf(real y, real mu, real sigma, real tau) {
return log(tau) + log1m(tau)
- log(sigma)
- 2 * ((y < mu) ? (1 - tau) * (mu - y) : tau * (y - mu)) / sigma;
}
It's not vectorized and doesn't drop constants (if tau is constant you can drop the first two terms and if sigma is constant you can drop the third, but it should work.
And fair warning: this distribution may cause problems in the region around y == mu because the derivative's not continuous there.
It is fairly straightforward to do quantile regression when the asymmetric
Laplace distribution is represented as a scale mixture of normals, which is
differentiable everywhere. But due to the discontinuity, I don't think it
is a big priority to add the _lpdf, etc. to Stan Math and the Stan language.
On Mon, May 22, 2017 at 12:22 PM, Bob Carpenter ***@***.***> wrote:
Thanks for the issue with definition. This should be relatively easy. You
can, of course, just code it in Stan now as
real skew_double_exponential_lpdf(real y, real mu, real sigma, real tau) {
return log(tau) + log1m(tau)
- log(sigma)
- 2 * ((y < mu) ? (1 - tau) * (mu - y) : tau * (y - mu)) / sigma;
}
It's not vectorized and doesn't drop constants (if tau is constant you can
drop the first two terms and if sigma is constant you can drop the third,
but it should work.
And fair warning: this distribution may cause problems in the region
around y == mu because the derivative's not continuous there.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#2312 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/ADOrqhQdA1ZqwsnQrHYRwsRmXtLTbqAIks5r8bZHgaJpZM4NhzRp>
.
Hey @bob-carpenter and @bgoodri , would you mind if I had a look at this and implement it in math? Like I said in another thread, I'd like to help out more with Stan, but have trouble identifying "what needs to be done", so I guess just fixing issues would be a good start (if that is fine with you).
By all means. It's open source and we love getting new contributors. Let us know if you need help. Our onboarding docs are still something of a mess.
I would suggest going to the issue (in stan-dev/math, not in the monorepo project that never got finished) and commenting that you're working on an implementation. If there's not an issue, creating one is the first step.
Basically, anything that has an issue is something we want to implement. The problem is that they're not prioritized or sorted for dependency. That's largely because what to work on is a matter of individual developer priorities and what they're interested in doing. Is there something you'd like to add to Stan, either on the issue tracker or not?
I would suggest going to the issue (in stan-dev/math, not in the monorepo project that never got finished) and commenting that you're working on an implementation. If there's not an issue, creating one is the first step.
thanks! Will do.
Is there something you'd like to add to Stan, either on the issue tracker or not?
No, not really. I just want to help out right now until I understand math and stan better...
Activity
bob-carpenter commentedon May 22, 2017
Thanks for the issue with definition. This should be relatively easy. You can, of course, just code it in Stan now as
It's not vectorized and doesn't drop constants (if tau is constant you can drop the first two terms and if sigma is constant you can drop the third, but it should work.
And fair warning: this distribution may cause problems in the region around
y == mubecause the derivative's not continuous there.bgoodri commentedon May 22, 2017
dirmeier commentedon Jul 6, 2020
Hey @bob-carpenter and @bgoodri , would you mind if I had a look at this and implement it in
math? Like I said in another thread, I'd like to help out more with Stan, but have trouble identifying "what needs to be done", so I guess just fixing issues would be a good start (if that is fine with you).Cheers,
Simon
bgoodri commentedon Jul 6, 2020
bob-carpenter commentedon Jul 7, 2020
By all means. It's open source and we love getting new contributors. Let us know if you need help. Our onboarding docs are still something of a mess.
I would suggest going to the issue (in stan-dev/math, not in the monorepo project that never got finished) and commenting that you're working on an implementation. If there's not an issue, creating one is the first step.
Basically, anything that has an issue is something we want to implement. The problem is that they're not prioritized or sorted for dependency. That's largely because what to work on is a matter of individual developer priorities and what they're interested in doing. Is there something you'd like to add to Stan, either on the issue tracker or not?
dirmeier commentedon Jul 8, 2020
Hi @bob-carpenter
thanks! Will do.
No, not really. I just want to help out right now until I understand math and stan better...
SteveBronder commentedon Mar 24, 2026
Closed in stan-dev/math#2271