@numero-uno-jpn/rstats 0.15.1 → 0.15.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (88) hide show
  1. package/CHANGELOG.md +147 -0
  2. package/README.ja.md +8 -8
  3. package/README.md +8 -8
  4. package/dist/chunks/{chunk-735NNFAS.js → chunk-3THFTB36.js} +2 -2
  5. package/dist/chunks/chunk-3TSWYE5L.js +2 -0
  6. package/dist/chunks/{chunk-7J4HW6VF.js → chunk-3WPU6LGK.js} +2 -2
  7. package/dist/chunks/{chunk-Z3C3G5XI.js → chunk-5ITR67MB.js} +2 -2
  8. package/dist/chunks/chunk-5NRFU6F6.js +2 -0
  9. package/dist/chunks/{chunk-SAZAEPZC.js → chunk-E2LCSVQV.js} +1 -1
  10. package/dist/chunks/chunk-FCNVTIPJ.js +2 -0
  11. package/dist/chunks/chunk-FKAKALOZ.js +2 -0
  12. package/dist/chunks/{chunk-5OSQ76OO.js → chunk-HD73UKPT.js} +2 -2
  13. package/dist/chunks/{chunk-4ILI2FSB.js → chunk-IUULP3LE.js} +1 -1
  14. package/dist/chunks/{chunk-LY2T6DA6.js → chunk-JQG3YQOC.js} +2 -2
  15. package/dist/chunks/chunk-KT66SB7R.js +2 -0
  16. package/dist/chunks/{chunk-IQOVOHZG.js → chunk-MAUAOQG3.js} +2 -2
  17. package/dist/chunks/{chunk-GEJCBCMP.js → chunk-MDYE7QP2.js} +2 -2
  18. package/dist/chunks/{chunk-5SQFDLNG.js → chunk-NM3Z2UBQ.js} +2 -2
  19. package/dist/chunks/{chunk-5XQZNKHZ.js → chunk-PMJI5QO6.js} +2 -2
  20. package/dist/chunks/chunk-UF7KOTHF.js +3 -0
  21. package/dist/chunks/chunk-UOE57JGT.js +2 -0
  22. package/dist/chunks/{chunk-3QTVXDUM.js → chunk-USPEBXSR.js} +2 -2
  23. package/dist/chunks/{chunk-H4CHJMFU.js → chunk-VLUL2HFW.js} +1 -1
  24. package/dist/chunks/{chunk-VOIJKNL2.js → chunk-ZIX7NYQF.js} +1 -1
  25. package/dist/descriptive.js +2 -2
  26. package/dist/distributions/arcsine.js +48 -4
  27. package/dist/distributions/beta.d.ts +1 -1
  28. package/dist/distributions/beta.js +75 -2
  29. package/dist/distributions/cauchy.js +76 -5
  30. package/dist/distributions/exponential.js +16 -2
  31. package/dist/distributions/f.js +143 -24
  32. package/dist/distributions/gamma.d.ts +13 -2
  33. package/dist/distributions/gamma.js +122 -12
  34. package/dist/distributions/geometric.js +19 -3
  35. package/dist/distributions/invgamma.js +60 -10
  36. package/dist/distributions/kumaraswamy.js +116 -17
  37. package/dist/distributions/laplace.js +5 -2
  38. package/dist/distributions/logistic.js +8 -2
  39. package/dist/distributions/lognormal.js +40 -5
  40. package/dist/distributions/nbeta.js +597 -52
  41. package/dist/distributions/nchisq.d.ts +25 -0
  42. package/dist/distributions/nchisq.js +381 -96
  43. package/dist/distributions/negbinomial.js +26 -6
  44. package/dist/distributions/normal.js +29 -1
  45. package/dist/distributions/nt.d.ts +28 -3
  46. package/dist/distributions/nt.js +401 -63
  47. package/dist/distributions/pareto.js +73 -19
  48. package/dist/distributions/t.js +102 -12
  49. package/dist/distributions/triangular.js +93 -27
  50. package/dist/distributions/tukey.js +110 -50
  51. package/dist/distributions/uniform.js +14 -9
  52. package/dist/distributions/weibull.js +65 -10
  53. package/dist/distributions.js +2 -2
  54. package/dist/internal/ddexp.d.ts +13 -0
  55. package/dist/internal/ddexp.js +55 -3
  56. package/dist/internal/discrete.js +30 -7
  57. package/dist/internal/invert.d.ts +5 -0
  58. package/dist/internal/invert.js +59 -5
  59. package/dist/internal/noncentral.d.ts +41 -0
  60. package/dist/internal/noncentral.js +124 -2
  61. package/dist/internal/poissonMixture.d.ts +7 -2
  62. package/dist/internal/poissonMixture.js +142 -38
  63. package/dist/linalg.js +2 -2
  64. package/dist/mixed.js +2 -2
  65. package/dist/numerics.js +2 -2
  66. package/dist/rstats.js +14 -14
  67. package/dist/special/beta.js +7 -0
  68. package/dist/special/dd.d.ts +1 -1
  69. package/dist/special/dd.js +4 -1
  70. package/dist/special/gamma.js +4 -0
  71. package/dist/special/igam.js +126 -21
  72. package/dist/special/incbet.d.ts +10 -0
  73. package/dist/special/incbet.js +218 -48
  74. package/dist/special/incbetLargeA.js +53 -14
  75. package/dist/special/incbetPrefactor.d.ts +57 -0
  76. package/dist/special/incbetPrefactor.js +103 -0
  77. package/dist/special/incbetTemme.js +15 -3
  78. package/dist/special/loader.js +97 -22
  79. package/dist/special.js +2 -2
  80. package/dist/tests.js +2 -2
  81. package/package.json +1 -1
  82. package/dist/chunks/chunk-5YMP4WAJ.js +0 -2
  83. package/dist/chunks/chunk-BDJPSEA7.js +0 -2
  84. package/dist/chunks/chunk-KO6QQPC6.js +0 -2
  85. package/dist/chunks/chunk-OLPTFKIZ.js +0 -3
  86. package/dist/chunks/chunk-TYFGVCVQ.js +0 -2
  87. package/dist/chunks/chunk-UWBYDIOH.js +0 -2
  88. package/dist/chunks/chunk-UZHY5DWN.js +0 -2
@@ -1,4 +1,19 @@
1
1
  export declare function dnchisq1(x: number, df: number, ncp: number, log: boolean): number;
2
+ /**
3
+ * log f(x) at x = x0 e^v, with the offset v taken exactly where the density varies faster than the rounding of x can
4
+ * follow: in the asymptotic forms the exponent depends on x through sqrt(x) - sqrt(λ) or λ + 2ν - x, which are formed
5
+ * from x0 and v (by expm1) instead of from the double x. Used by integrals over log x (src/distributions/nbeta.ts),
6
+ * where x0 e^v rounded would put an error of eps |d log f / d log x| (eps sqrt(λ) near the mode) into each node.
7
+ */
8
+ export declare function dnchisqLogNear(x0: number, v: number, df: number, ncp: number): number;
9
+ /**
10
+ * P(s, t) (lower) or Q(s, t) of the central gamma distribution (its log if log) for a large shape (s > 1e4), as the
11
+ * central χ² with 2s degrees of freedom through debyeTails (λ = 0; the uniform expansion then reduces to Stirling's
12
+ * series), at t = t0 e^v with the offset v exact: N = 2s - 2 - 2t is formed from t0 and v (src/distributions/nbeta.ts
13
+ * integrates over log t, where the rounding of t0 e^v would carry an error of eps sqrt(s) into the log). The
14
+ * incomplete gamma function can take 40 ms for such shapes (s = 1e12, t < s; 0.1 s at s = 1e37)
15
+ */
16
+ export declare function gammaTailNear(s: number, t0: number, v: number, lower: boolean, log: boolean): number;
2
17
  export declare function pnchisq1(q: number, df: number, ncp: number, lowerTail: boolean, logP: boolean): number;
3
18
  /**
4
19
  * A tail that a rigorous bound places below the smallest positive double: `far` is "lower" when P[X <= q] is
@@ -10,4 +25,14 @@ export type FarTail = "lower" | "upper" | undefined;
10
25
  * (log 0). The log of the far tail is left to the full computation (undefined).
11
26
  */
12
27
  export declare function negligibleTail(far: FarTail, lowerTail: boolean, logP: boolean): number | undefined;
28
+ /**
29
+ * The quantile x found by the Newton iteration if its log probability lp is within 1e-15 of the target, or within 1e-9
30
+ * and x is the quantile to 1e-14 (x reaches the target and x (1 - 1e-14) does not: where the distribution function is
31
+ * nearly flat in log x the iteration can stall 1e-8 away in log p, and where it is steep in log x, 1e-12 in log p can
32
+ * be 4e-13 in x), otherwise that of `search`. The iteration fails where the distribution function is too steep to be
33
+ * resolved by the doubles (for a huge df or ncp the spread can be below the spacing of x, so that the function steps
34
+ * from 0 to 1/2 at one double); a search over the doubles (searchDoubles) then gives the smallest x that reaches the
35
+ * target
36
+ */
37
+ export declare function confirmQuantile(x: number, lp: number, logTarget: number, search: () => number, passes: (x: number) => boolean): number;
13
38
  export declare function qnchisq1(p: number, df: number, ncp: number, lowerTail: boolean, logP: boolean): number;