From 14a198fa70709bacb36008269c498afae6bd4ad6 Mon Sep 17 00:00:00 2001 From: Alex Wadell Date: Sat, 11 Jan 2025 11:52:58 -0500 Subject: [PATCH 1/3] Fix typo in doc strings for r2 Repeat of https://github.com/JuliaStats/StatsBase.jl/pull/732 --- src/statisticalmodel.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/statisticalmodel.jl b/src/statisticalmodel.jl index e8f4f68..c2db6ab 100644 --- a/src/statisticalmodel.jl +++ b/src/statisticalmodel.jl @@ -233,7 +233,7 @@ Pseudo-coefficient of determination (pseudo R-squared). For nonlinear models, one of several pseudo R² definitions must be chosen via `variant`. Supported variants are: -- `:MacFadden` (a.k.a. likelihood ratio index), defined as ``1 - \\log (L)/\\log (L_0)``; +- `:McFadden` (a.k.a. likelihood ratio index), defined as ``1 - \\log (L)/\\log (L_0)``; - `:CoxSnell`, defined as ``1 - (L_0/L)^{2/n}``; - `:Nagelkerke`, defined as ``(1 - (L_0/L)^{2/n})/(1 - L_0^{2/n})``. - `:devianceratio`, defined as ``1 - D/D_0``. From 6e73c07a3f100444e5eb70d0799fc4ccac0eecd6 Mon Sep 17 00:00:00 2001 From: Alex Wadell Date: Sat, 11 Jan 2025 11:55:19 -0500 Subject: [PATCH 2/3] fix typo in adjr2 --- src/statisticalmodel.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/statisticalmodel.jl b/src/statisticalmodel.jl index c2db6ab..c63c39d 100644 --- a/src/statisticalmodel.jl +++ b/src/statisticalmodel.jl @@ -290,7 +290,7 @@ adjr2(model::StatisticalModel) Adjusted pseudo-coefficient of determination (adjusted pseudo R-squared). For nonlinear models, one of the several pseudo R² definitions must be chosen via `variant`. -The only currently supported variants are `:MacFadden`, defined as ``1 - (\\log (L) - k)/\\log (L0)`` and +The only currently supported variants are `:McFadden`, defined as ``1 - (\\log (L) - k)/\\log (L0)`` and `:devianceratio`, defined as ``1 - (D/(n-k))/(D_0/(n-1))``. In these formulas, ``L`` is the likelihood of the model, ``L0`` that of the null model (the model including only the intercept), ``D`` is the deviance of the model, From 2329ea0ea4a275b3f5d01a27e028d45773403edc Mon Sep 17 00:00:00 2001 From: Alex Wadell Date: Mon, 26 May 2025 18:31:11 +0000 Subject: [PATCH 3/3] Bump patch version --- Project.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Project.toml b/Project.toml index 14ebc6a..09480dc 100644 --- a/Project.toml +++ b/Project.toml @@ -1,7 +1,7 @@ name = "StatsAPI" uuid = "82ae8749-77ed-4fe6-ae5f-f523153014b0" authors = ["Milan Bouchet-Valat