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
kprime: do not use small v2 (<=13). #12
Comments
Thanks for filing. At one point I implemented the density described by Lecoutre, and can dust that off again. I think k-prime is interesting enough to warrant a very small package to its "PDQR" functions. Tracking here. |
Quick question: do you need the density function? The CDF can be computed accurately via a series, and the quantile function can invert that with |
Hi Steven,
I think the quantile and CDF would suffice. I can use the CDF to test the fit. If the density function (PDF) proves difficult, perhaps a condition test in the density function that rejects low v2, and a note in details would help other people stumble over the issue.
I am trying to find a good fit for experimental data that are thick-tailed skewed and the densities I was getting with the low v1 and v2 with the random variate looked promising. It was when I tried the PDF, CDF and inverse functions that I noticed the behavior with respect to v2. Initially, I just wanted to verify that the density function appeared similar to the density from the random variate. Of course, the CDF can provide the same information (just not as intuitively, since we usually do not summarize experimental distributions by their cumulative function).
Gerard
|
Starting a |
I was using the kprime functions and was able to generate random variates with v1 and v2 as small integers.
When I tried to generate the density variate (dkprime) I ran into problems (which I should have realized were due to the ratio algebra).
I ran a number of tests using the testf() in the vignette and when v2 <= 12 (perhaps 13) the theoretical distributions become unstable.
At v2 <=5 there are many values of NA or Inf, accompanied by warnings from lgamarat()
At v2 = 6 the density variate is a square wave form
At v2 = 7 the density variate is two separate unimodal distributions (separate from the centrality specification of 'a').
At v2 = 8 the density variate is a bimodal distribution with the dip centered at a.
Perhaps a warning in the documentation not to use v2 <= 13 would be helpful to other folk like me (and avoid questions).
The text was updated successfully, but these errors were encountered: