Skip to content
This repository has been archived by the owner on Dec 3, 2019. It is now read-only.

dnLogNormal help inaccurate #137

Open
ssolo opened this issue Oct 2, 2018 · 1 comment
Open

dnLogNormal help inaccurate #137

ssolo opened this issue Oct 2, 2018 · 1 comment

Comments

@ssolo
Copy link

ssolo commented Oct 2, 2018

mu <- 1.
sigma <- 1.
for (j in 1:10000) {x[j]~dnLnorm(mu,sigma)}
mean(x)
4.507144
var(x)
36.43327

The mean is exp(mu+sigma^2/2) and the variance is (exp(sigma^2)-1)exp(2mu+sigma^2).

The help on the other hand states the following:

Arguments

   mean : The mean in log-space (observed mean is exp(m)).
          Type:       Real, <any>, const reference
     sd : The standard deviation in log-space.
          Type:       RealPos, <any>, const reference
@ssolo
Copy link
Author

ssolo commented Oct 13, 2018 via email

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

No branches or pull requests

1 participant