Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Half Normal or Log Normal #2

Closed
apeterson91 opened this issue Dec 12, 2017 · 1 comment
Closed

Half Normal or Log Normal #2

apeterson91 opened this issue Dec 12, 2017 · 1 comment

Comments

@apeterson91
Copy link

apeterson91 commented Dec 12, 2017

Your gaussian processes 3 write-up states that the priors for the hyper parameters are half normal,

e.g.
$$\alpha \sim $ half- $\mathcal{N}(0,2)$$

and the corresponding code is
parameters{ ... real<lower=0> alpha; } model{ alpha ~ normal(0,2); ... }

But according to the stan reference manual (v 2.16.0) pg. 400: "If a variable X is declared to have a lower bound $a$, it is transformed to be an unbounded random variable $Y$, where ."

$$ Y = log (X - A)$$

which in this case would just be the log, suggesting that the new random variable is log normal, not half - would you mind clearing up this discrepancy for me?

I'm using a similar parameterization in a model I'm working with and would like to know the "real" prior distribution I'm using. - Many Thanks.

@apeterson91 apeterson91 changed the title Half Normal or Log Transform Half Normal or Log Normal Dec 12, 2017
@betanalpha
Copy link
Owner

Stan automatically adds the Jacobian to ensure that we are indeed specifying a half normal distribution and not a log normal distribution. Please consult the Stan manual for more information.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants