Package: kvr2 0.2.0.9000

kvr2: Calculate and Compare Multiple Definitions of Coefficient of Determination

Calculate nine types of coefficients of determination (R-squared) based on the classification by Kvalseth (1985) <doi:10.1080/00031305.1985.10479448>. This package is designed for educational purposes to demonstrate how R-squared values can fluctuate depending on the choice of formula, particularly in power regression models or linear models without an intercept. By providing a comprehensive list of definitions, it helps users understand the mathematical sensitivity of goodness-of-fit indices.

Authors:Mao Kobayashi [aut, cre]

kvr2_0.2.0.9000.tar.gz
kvr2_0.2.0.9000.zip(r-4.7)kvr2_0.2.0.9000.zip(r-4.6)kvr2_0.2.0.9000.zip(r-4.5)
kvr2_0.2.0.9000.tgz(r-4.6-any)kvr2_0.2.0.9000.tgz(r-4.5-any)
kvr2_0.2.0.9000.tar.gz(r-4.7-any)kvr2_0.2.0.9000.tar.gz(r-4.6-any)
kvr2_0.2.0.9000.tgz(r-4.6-emscripten)
manual.pdf |manual.html
DESCRIPTION |NEWS
card.svg |card.png
kvr2/json (API)

# Install 'kvr2' in R:
install.packages('kvr2', repos = c('https://indenkun.r-universe.dev', 'https://cloud.r-project.org'))

Bug tracker:https://github.com/indenkun/kvr2/issues

Pkgdown/docs site:https://indenkun.github.io

On CRAN:

Conda:

4.60 score 1 stars 9 scripts 246 downloads 19 exports 30 dependencies

Last updated from:5df8d5dc85. Checks:9 OK. Indexed: yes.

TargetResultTimeFilesSyslog
linux-devel-x86_64OK134
source / vignettesOK192
linux-release-x86_64OK147
macos-release-arm64OK134
macos-oldrel-arm64OK81
windows-develOK97
windows-releaseOK87
windows-oldrelOK91
wasm-releaseOK116

Exports:comp_fitcomp_modelMAEmodel_infoMSEplot_diagnosticplot_kvr2r2r2_1r2_2r2_3r2_4r2_5r2_6r2_7r2_8r2_9r2_adjustedRMSE

Dependencies:clicpp11dplyrfarvergenericsggplot2gluegtableinsightisobandlabelinglifecyclemagrittrpillarpkgconfigpurrrR6RColorBrewerrlangS7scalesstringistringrtibbletidyrtidyselectutf8vctrsviridisLitewithr

Internal Design
Internal Design of kvr2 | Overview | Data Flow Architecture | 1. Extraction Phase (values_lm) | 2. Computation and Metadata Injection (r2, comp_model) | 3. Dispatch and Visualization Phase | Handling Non-Standard Evaluation (NSE) | Dependency Strategy | Troubleshooting and Maintenance

Last update: 2026-03-10
Started: 2026-02-24

The Pitfalls of R-squared: Understanding Mathematical Sensitivity
Introduction: Why $R^2$ is Not Unique | The Eight + One Definitions | Standard Definitions | Definitions for No-Intercept Models | Robust Definition | When $R^2$ Goes Negative: Interpretation and Risks | Meaning of Negative Values | Case Study: Forcing a No-Intercept Model | The Transformation Trap (Power Models) | Distinguishing Variable Names from Functions | Transparency and Metadata: Beyond the Numbers | Inspecting Model Information | Enhanced Console Output | Technical Note: How R Calculates | The Shift in Baseline | Case Study: The Danger of No-Intercept Models | The Trap | Visualizing the Sensitivity of R-squared | Comparing Intercept vs. No-Intercept Models | Practical Example: The Sensitivity of $R^2$ | 1. The Inflation of $R^2_2$ | 2. The Drop in Predictive Accuracy | Adjusted R-squared Comparison | Visualizing the Comparison: The Diagnostic Dashboard | Key Features of the Dashboard: | Example: When $R^2$ Breaks (The Importance of Visuals) | A Note on Plot Customization | Conclusion: A Multi-Metric Approach | References

Last update: 2026-03-10
Started: 2026-02-05