Closed dincerti closed 6 years ago
The function pgengamma with Q=0 does coincide with plnorm. The function qgenamma with Q=0, mu=mu and sigma=sigma corresponds to qlnorm with meanlog=mean, sdlog = 1/(sigma^2). The following example illustrates the issue:
plot(seq(0.01,.99,.01),qlnorm(seq(0.01,.99,.01),meanlog = 2,sdlog = 2)) lines(seq(0.01,.99,.01),qgengamma(seq(0.01,.99,.01),mu = 2,sigma = sqrt(1/2),Q=0),col="blue")
Thanks both - fixed in 49dc00f
Many thanks.
There may be a bug with the quantile function for the generalized gamma distribution with Q = 0. For example, the code
qgengamma(pgengamma(.5, mu = 2, sigma = 2, Q = 0), mu = 2, sigma = 2, Q = 0)
does not return 0.5. This may be related to line 210 in GenGamma.R:
ret[ind][Q==0] <- qlnorm(p[Q==0], mu[Q==0], 1/sigma[Q==0]^2)