@numero-uno-jpn/rstats 1.4.0 → 1.5.0
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.
- package/CHANGELOG.md +38 -0
- package/README.ja.md +7 -5
- package/README.md +7 -5
- package/dist/chunks/{chunk-SVS54D6Z.js → chunk-2IYY74LX.js} +2 -2
- package/dist/chunks/{chunk-GBSMRVUY.js → chunk-2MYUAEYE.js} +2 -2
- package/dist/chunks/{chunk-YBOSCQF2.js → chunk-3BEE6BHN.js} +1 -1
- package/dist/chunks/{chunk-F6Z3GLWA.js → chunk-73QCE2CI.js} +2 -2
- package/dist/chunks/{chunk-GLGOV3A5.js → chunk-AIXJAVDS.js} +2 -2
- package/dist/chunks/{chunk-GIER5WMB.js → chunk-BJOZZ5J6.js} +2 -2
- package/dist/chunks/{chunk-GEF2YRBV.js → chunk-CX4XK7WC.js} +2 -2
- package/dist/chunks/{chunk-PZ66PUWC.js → chunk-DYCWYHYV.js} +1 -1
- package/dist/chunks/{chunk-H72MW7YP.js → chunk-E5M5RAVB.js} +2 -2
- package/dist/chunks/{chunk-UMMCVF53.js → chunk-F2MURX2Y.js} +2 -2
- package/dist/chunks/{chunk-27VFB3SA.js → chunk-F7SQG6BV.js} +2 -2
- package/dist/chunks/{chunk-S2YCFUCA.js → chunk-FCF6FBJP.js} +2 -2
- package/dist/chunks/{chunk-6FZAJQ4H.js → chunk-FMLFYM7N.js} +2 -2
- package/dist/chunks/{chunk-WWJGCBWH.js → chunk-GDMNF4P3.js} +1 -1
- package/dist/chunks/{chunk-ZRFZ5UIB.js → chunk-JBJTXMRJ.js} +2 -2
- package/dist/chunks/{chunk-56GFP4UU.js → chunk-L7PDJNJ3.js} +2 -2
- package/dist/chunks/{chunk-BQJFFGYP.js → chunk-LVB22NKV.js} +2 -2
- package/dist/chunks/{chunk-HWB7XRX2.js → chunk-MJV5G7FG.js} +2 -2
- package/dist/chunks/{chunk-5SW3L6J3.js → chunk-MXOGMN4P.js} +2 -2
- package/dist/chunks/{chunk-RY7CCWVU.js → chunk-MYRCEQ2R.js} +1 -1
- package/dist/chunks/{chunk-ZQSOMEIM.js → chunk-Q32WODL4.js} +2 -2
- package/dist/chunks/{chunk-UNP4HBPP.js → chunk-RZBX6VYO.js} +2 -2
- package/dist/chunks/{chunk-J72MLFUG.js → chunk-TP4PRPVQ.js} +2 -2
- package/dist/chunks/{chunk-RUZATICF.js → chunk-UJM7AJII.js} +1 -1
- package/dist/chunks/{chunk-X7K6EF7S.js → chunk-VAWD57ZB.js} +2 -2
- package/dist/chunks/{chunk-TEHMTQNB.js → chunk-WBEYJ5W5.js} +2 -2
- package/dist/chunks/{chunk-V2KVTAVV.js → chunk-YK2EJU6T.js} +2 -2
- package/dist/descriptive.js +2 -2
- package/dist/distributions.js +2 -2
- package/dist/entries/tests.d.ts +2 -0
- package/dist/entries/tests.js +2 -0
- package/dist/htest/sampleSize.d.ts +290 -0
- package/dist/htest/sampleSize.js +625 -0
- package/dist/linalg.js +2 -2
- package/dist/mixed.js +2 -2
- package/dist/models/competingRisks.d.ts +1 -1
- package/dist/models/competingRisks.js +42 -30
- package/dist/models/metaAnalysis.d.ts +207 -0
- package/dist/models/metaAnalysis.js +696 -0
- package/dist/numerics.js +2 -2
- package/dist/rstats.js +19 -16
- package/dist/special.js +2 -2
- package/dist/tests.js +16 -13
- package/llms.txt +5 -2
- package/package.json +1 -1
package/llms.txt
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
# rStats.js
|
|
2
2
|
|
|
3
3
|
> R-compatible statistics for JavaScript and TypeScript: distributions, random numbers that match
|
|
4
|
-
> R's `set.seed()`, descriptive statistics, hypothesis tests, `lm`, `glm
|
|
5
|
-
>
|
|
4
|
+
> R's `set.seed()`, descriptive statistics, hypothesis tests, `lm`, `glm`, lme4's `lmer` and `glmer`, trial-design sample-size
|
|
5
|
+
> and power calculations, meta-analysis and meta-regression, special functions, numerical methods and linear algebra,
|
|
6
|
+
> with R's function names, defaults and numerical results.
|
|
6
7
|
> Every function is tested against R 4.6.2. ESM only, no dependencies, runs in browsers, Node.js,
|
|
7
8
|
> Deno and Bun.
|
|
8
9
|
|
|
@@ -62,6 +63,8 @@ a CDN without a bundler, see the README section "Using it in the browser".
|
|
|
62
63
|
`anova(fit, type = "II")` → `lmerAnova(fit, { type: "II" })` (`{ terms, sumSq, meanSq, numDF, denDF, F, pValue }`,
|
|
63
64
|
Type III by default); lme4's `anova(m1, m2)` → `lmerAnova([m1, m2], { names })` (likelihood-ratio tests; REML fits
|
|
64
65
|
are refitted by ML). Pass the object `lmer` returned (not a copy). Kenward-Roger is not available.
|
|
66
|
+
- Trial-design sample size and power: epiR's parallel-trial `epi.ss*` functions → `epiSsequb`, `epiSsequc`, `epiSsninfb`, `epiSsninfc`, `epiSssupb` and `epiSssupc`; exact paired McNemar power → `powerPaired2x2`; survival sample size and power → `ssizeCT`, `powerCT`, `ssizeEpi`, `powerEpi` and `numDEpi`; Simon's two-stage design → `ph2simon`.
|
|
67
|
+
- Meta-analysis: `metafor::escalc` → `escalc`, `rma.uni` → `rma`, `confint.rma` → `confintRma`, `predict.rma` → `predictRma`, and `regtest` → `regtest`. `rma` accepts effect sizes and sampling variances or an `escalc` result; moderators may be supplied as a numeric matrix.
|
|
65
68
|
- Generalized linear mixed models: lme4's `glmer(y ~ x + (1 | g), data = d, family = poisson, nAGQ = 1)` →
|
|
66
69
|
`glmer("y ~ x + (1 | g)", d, { family: "poisson", nAGQ: 1 })` (families binomial, poisson, Gamma, inverse.gaussian,
|
|
67
70
|
gaussian with a link other than identity; `nAGQ` 2 to 100 for one scalar term, binomial and poisson only; a binomial
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@numero-uno-jpn/rstats",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.5.0",
|
|
4
4
|
"description": "R-compatible statistical functions for the browser: distributions, random numbers that match set.seed(), hypothesis tests and linear algebra, tested against R.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"statistics",
|