Date: 2022-07-27 13:38 Sender: Georgi BoshnakovFixed in rev6260, thanks for the report. More details in inst/NEWS.Rd.
1. qsnorm() had problems in the centre of the distribution, worsening as the skew was getting further away from 1. The error was due to wrongly branching for the two pieces of the distribution (the symmetric case was ok).
2. psnorm(), amazingly, was wrong for the single wrong value returned by qsnorm(0.5). This was due to sign() returning zero when the argument was zero, introducing discontinuity.
3. The same problems were present for the other skewed distributions: qsstd, psstd, qsged, and psged. Fixed those as well.
|
Date: 2022-07-17 07:12 Sender: Georgi BoshnakovAt cursory look at the code of qsnorm, the bug seems to be for p=0.5 exactly. I have put a more detailed comment there.
TODO: the other skewed dist's may have the same problem since they use similar code.
TODO: check also psnorm. Given the above, it is strange that psnorm(qsnorm(0.5)) gives the correct 0.5. |
Date: 2022-07-16 08:06 Sender: Georgi BoshnakovThanks for the report. Indeed, there seems to be severe loss of accuracy as the asymmetry, xi, increases away from 1:
> plot(function(p) qsnorm(p, xi = 1), from = 0, to = 1)
> plot(function(p) qsnorm(p, xi = 1.1), from = 0, to = 1)
> plot(function(p) qsnorm(p, xi = 1.3), from = 0, to = 1)
> plot(function(p) qsnorm(p, xi = 1.5), from = 0, to = 1)
> plot(function(p) qsnorm(p, xi = 2), from = 0, to = 1)
Warning message:
In qnorm(p = p, sd = Xi) : NaNs produced
|