Skip to content

Commit

Permalink
Merge pull request #516 from easystats/CRAN_submission
Browse files Browse the repository at this point in the history
CRAN submission
  • Loading branch information
strengejacke authored Nov 25, 2022
2 parents 04d7509 + 26905cb commit 239c484
Show file tree
Hide file tree
Showing 9 changed files with 249 additions and 40 deletions.
2 changes: 2 additions & 0 deletions .Rbuildignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@

^\.travis.yml
^\_pkgdown.yml
^\_pkgdown.yaml
^paper.bib$

^data/.
^docs/.
Expand Down
6 changes: 3 additions & 3 deletions CRAN-SUBMISSION
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
Version: 0.10.0
Date: 2022-10-03 13:48:20 UTC
SHA: 67a7d80863fe4a2b732a8c1723fcd557edcabddd
Version: 0.10.1
Date: 2022-11-25 07:34:48 UTC
SHA: 1d71aaeca11595b43002937eb80099ed7c9908c3
4 changes: 2 additions & 2 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Type: Package
Package: performance
Title: Assessment of Regression Models Performance
Version: 0.10.0.13
Version: 0.10.1
Authors@R:
c(person(given = "Daniel",
family = "Lüdecke",
Expand Down Expand Up @@ -65,7 +65,7 @@ Depends:
R (>= 3.6)
Imports:
bayestestR (>= 0.13.0),
insight (>= 0.18.5),
insight (>= 0.18.7),
datawizard (>= 0.6.2),
methods,
stats,
Expand Down
6 changes: 1 addition & 5 deletions README.Rmd
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
output: github_document
bibliography: paper/paper.bib
bibliography: paper.bib
---

# performance <img src='man/figures/logo.png' align="right" height="139" />
Expand Down Expand Up @@ -69,10 +69,6 @@ citation("performance")

## Documentation

[![Documentation](https://img.shields.io/badge/documentation-performance-orange.svg?colorB=E91E63)](https://easystats.github.io/performance/)
[![Blog](https://img.shields.io/badge/blog-easystats-orange.svg?colorB=FF9800)](https://easystats.github.io/blog/posts/)
[![Features](https://img.shields.io/badge/features-performance-orange.svg?colorB=2196F3)](https://easystats.github.io/performance/reference/index.html)

There is a nice introduction into the package on [youtube](https://www.youtube.com/watch?v=EPIxQ5i5oxs).

## The *performance* workflow
Expand Down
43 changes: 19 additions & 24 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,10 +80,6 @@ citation("performance")

## Documentation

[![Documentation](https://img.shields.io/badge/documentation-performance-orange.svg?colorB=E91E63)](https://easystats.github.io/performance/)
[![Blog](https://img.shields.io/badge/blog-easystats-orange.svg?colorB=FF9800)](https://easystats.github.io/blog/posts/)
[![Features](https://img.shields.io/badge/features-performance-orange.svg?colorB=2196F3)](https://easystats.github.io/performance/reference/index.html)

There is a nice introduction into the package on
[youtube](https://www.youtube.com/watch?v=EPIxQ5i5oxs).

Expand Down Expand Up @@ -148,8 +144,8 @@ model <- stan_glmer(Petal.Length ~ Petal.Width + (1 | Species), data = iris, cor
r2(model)
#> # Bayesian R2 with Compatibility Interval
#>
#> Conditional R2: 0.953 (95% CI [0.941, 0.963])
#> Marginal R2: 0.824 (95% CI [0.713, 0.896])
#> Conditional R2: 0.953 (95% CI [0.942, 0.964])
#> Marginal R2: 0.825 (95% CI [0.721, 0.900])

library(lme4)
model <- lmer(Reaction ~ Days + (1 + Days | Subject), data = sleepstudy)
Expand Down Expand Up @@ -321,9 +317,9 @@ m1 <- lm(mpg ~ wt + cyl, data = mtcars)
model_performance(m1)
#> # Indices of model performance
#>
#> AIC | BIC | R2 | R2 (adj.) | RMSE | Sigma
#> -----------------------------------------------------
#> 156.010 | 161.873 | 0.830 | 0.819 | 2.444 | 2.568
#> AIC | AICc | BIC | R2 | R2 (adj.) | RMSE | Sigma
#> ---------------------------------------------------------------
#> 156.010 | 157.492 | 161.873 | 0.830 | 0.819 | 2.444 | 2.568
```

#### Logistic regression
Expand All @@ -333,9 +329,9 @@ m2 <- glm(vs ~ wt + mpg, data = mtcars, family = "binomial")
model_performance(m2)
#> # Indices of model performance
#>
#> AIC | BIC | Tjur's R2 | RMSE | Sigma | Log_loss | Score_log | Score_spherical | PCP
#> --------------------------------------------------------------------------------------------
#> 31.298 | 35.695 | 0.478 | 0.359 | 0.934 | 0.395 | -14.903 | 0.095 | 0.743
#> AIC | AICc | BIC | Tjur's R2 | RMSE | Sigma | Log_loss | Score_log | Score_spherical | PCP
#> -----------------------------------------------------------------------------------------------------
#> 31.298 | 32.155 | 35.695 | 0.478 | 0.359 | 0.934 | 0.395 | -14.903 | 0.095 | 0.743
```

#### Linear mixed model
Expand Down Expand Up @@ -366,12 +362,12 @@ m4 <- glm(counts ~ outcome + treatment, family = poisson())
compare_performance(m1, m2, m3, m4)
#> # Comparison of Model Performance Indices
#>
#> Name | Model | AIC (weights) | BIC (weights) | RMSE | Sigma | Score_log | Score_spherical | R2 | R2 (adj.) | Tjur's R2 | Log_loss | PCP | AICc (weights) | R2 (cond.) | R2 (marg.) | ICC | Nagelkerke's R2
#> Name | Model | AIC (weights) | AICc (weights) | BIC (weights) | RMSE | Sigma | Score_log | Score_spherical | R2 | R2 (adj.) | Tjur's R2 | Log_loss | PCP | R2 (cond.) | R2 (marg.) | ICC | Nagelkerke's R2
#> ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
#> m1 | lm | 156.0 (<.001) | 161.9 (<.001) | 2.444 | 2.568 | | | 0.830 | 0.819 | | | | (>.999) | | | |
#> m2 | glm | 31.3 (>.999) | 35.7 (>.999) | 0.359 | 0.934 | -14.903 | 0.095 | | | 0.478 | 0.395 | 0.743 | (>.999) | | | |
#> m3 | lmerMod | 1764.0 (<.001) | 1783.1 (<.001) | 23.438 | 25.592 | | | | | | | | 1764.5 (>.999) | 0.799 | 0.279 | 0.722 |
#> m4 | glm | 56.8 (<.001) | 57.7 (<.001) | 3.043 | 1.132 | -2.598 | 0.324 | | | | | | (>.999) | | | | 0.657
#> m1 | lm | 156.0 (<.001) | 157.5 (<.001) | 161.9 (<.001) | 2.444 | 2.568 | | | 0.830 | 0.819 | | | | | | |
#> m2 | glm | 31.3 (>.999) | 32.2 (>.999) | 35.7 (>.999) | 0.359 | 0.934 | -14.903 | 0.095 | | | 0.478 | 0.395 | 0.743 | | | |
#> m3 | lmerMod | 1764.0 (<.001) | 1764.5 (<.001) | 1783.1 (<.001) | 23.438 | 25.592 | | | | | | | | 0.799 | 0.279 | 0.722 |
#> m4 | glm | 56.8 (<.001) | 76.8 (<.001) | 57.7 (<.001) | 3.043 | 1.132 | -2.598 | 0.324 | | | | | | | | | 0.657
```

#### General index of model performance
Expand All @@ -384,12 +380,12 @@ of model performance and sort the models from the best one to the worse.
compare_performance(m1, m2, m3, m4, rank = TRUE)
#> # Comparison of Model Performance Indices
#>
#> Name | Model | RMSE | Sigma | AIC weights | BIC weights | Performance-Score
#> --------------------------------------------------------------------------------
#> m2 | glm | 0.359 | 0.934 | 1.000 | 1.000 | 100.00%
#> m4 | glm | 3.043 | 1.132 | 2.96e-06 | 1.63e-05 | 46.89%
#> m1 | lm | 2.444 | 2.568 | 8.30e-28 | 3.99e-28 | 46.09%
#> m3 | lmerMod | 23.438 | 25.592 | 0.00e+00 | 0.00e+00 | 0.00%
#> Name | Model | RMSE | Sigma | AIC weights | AICc weights | BIC weights | Performance-Score
#> -----------------------------------------------------------------------------------------------
#> m2 | glm | 0.359 | 0.934 | 1.000 | 1.000 | 1.000 | 100.00%
#> m4 | glm | 3.043 | 1.132 | 2.96e-06 | 2.06e-10 | 1.63e-05 | 37.51%
#> m1 | lm | 2.444 | 2.568 | 8.30e-28 | 6.07e-28 | 3.99e-28 | 36.87%
#> m3 | lmerMod | 23.438 | 25.592 | 0.00e+00 | 0.00e+00 | 0.00e+00 | 0.00%
```

#### Visualisation of indices of models’ performance
Expand Down Expand Up @@ -479,7 +475,6 @@ ed. Quantitative Methodology Series. New York: Routledge.
Johnson, Paul C. D. 2014. “Extension of Nakagawa & Schielzeth’s R2 GLMM
to Random Slopes Models.” Edited by Robert B. O’Hara. *Methods in
Ecology and Evolution* 5 (9): 944–46.
<https://doi.org/10.1111/2041-210X.12225>.

</div>

Expand Down
7 changes: 1 addition & 6 deletions cran-comments.md
Original file line number Diff line number Diff line change
@@ -1,6 +1 @@
## revdepcheck results

We checked 27 reverse dependencies, comparing R CMD check results across CRAN and dev versions of this package.

* We saw 0 new problems
* We failed to check 0 packages
Regular update. We checked all reverse dependencies, comparing R CMD check results across CRAN and dev versions of this package and saw no new problems.
Binary file modified man/figures/unnamed-chunk-14-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified man/figures/unnamed-chunk-20-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
221 changes: 221 additions & 0 deletions paper.bib
Original file line number Diff line number Diff line change
@@ -0,0 +1,221 @@
@book{hox2017multilevel,
title={Multilevel analysis: Techniques and applications},
isbn={9781138121362},
author={Hox, Joop J and Moerbeek, Mirjam and Van de Schoot, Rens},
year={2017},
publisher={Routledge}
}

@Article{makowski2019bayetestR,
doi = {10.21105/joss.01541},
url = {https://doi.org/10.21105/joss.01541},
year = {2019},
volume = {4},
number = {40},
pages = {1541},
author = {Dominique Makowski and Mattan Ben-Shachar and Daniel Lüdecke},
title = {{bayestestR}: Describing Effects and their Uncertainty, Existence and Significance within the Bayesian Framework},
journal = {Journal of Open Source Software}
}



@Article{ludecke2019insight,
title = {{insight}: A Unified Interface to Access Information from Model Objects in {R}},
volume = {4},
doi = {10.21105/joss.01412},
number = {38},
journal = {Journal of Open Source Software},
author = {Daniel Lüdecke and Philip Waggoner and Dominique Makowski},
year = {2019},
pages = {1412}
}


@Manual{rcore,
title = {{R}: A Language and Environment for Statistical Computing},
author = {{R Core Team}},
organization = {R Foundation for Statistical Computing},
address = {Vienna, Austria},
year = {2021},
url = {https://www.R-project.org/}
}


@Manual{robinson_broom_2020,
title = {{broom}: Convert Statistical Objects into Tidy Tibbles},
author = {David Robinson and Alex Hayes and Simon Couch},
year = {2020},
note = {R package version 0.7.0},
url = {https://CRAN.R-project.org/package=broom}
}

@Article{ludecke2020see,
title = {{see}: Visualisation Toolbox for {'easystats'} and Extra Geoms, Themes and Color Palettes for {'ggplot2'}},
author = {Daniel Lüdecke and Mattan S. Ben-Shachar and Indrajeet Patil and Philip Waggoner and Dominique Makowski},
journal = {CRAN},
year = {2020},
note = {R package},
doi = {10.5281/zenodo.3952153},
url = {https://easystats.github.io/see/},
}


@Manual{revelle_psych_2019,
title = {{psych}: Procedures for Psychological, Psychometric, and Personality Research},
author = {William Revelle},
organization = {Northwestern University},
address = {Evanston, Illinois},
year = {2019},
note = {R package version 1.9.12},
url = {https://CRAN.R-project.org/package=psych}
}


@Article{saefken_caic4_2018,
title = {Conditional Model Selection in Mixed-Effects Models with {cAIC4}},
author = {Benjamin Saefken and David Ruegamer and Thomas Kneib and Sonja Greven},
journal = {ArXiv e-prints},
year = {2018},
eprint = {1803.05664},
month = {march},
url = {https://arxiv.org/abs/1803.05664}
}

@Article{benshachar2020effectsize,
title = {{effectsize}: Compute and interpret indices of effect size},
author = {Mattan S. Ben-Shachar and Dominique Makowski and Daniel Lüdecke},
journal = {CRAN},
year = {2020},
note = {R package},
doi = {10.5281/zenodo.3952214},
url = {https://easystats.github.io/effectsize},
}

@article{johnson_extension_2014,
title = {Extension of {Nakagawa} \& {Schielzeth}'s {R}2 {GLMM} to random slopes models},
volume = {5},
issn = {2041210X},
language = {en},
number = {9},
urldate = {2019-02-14},
journal = {Methods in Ecology and Evolution},
author = {Johnson, Paul C.D.},
editor = {O'Hara, Robert B.},
month = sep,
year = {2014},
pages = {944--946}
}

@Article{Lüdecke2020parameters,
title = {parameters: Extracting, Computing and Exploring the Parameters of Statistical Models using {R}.},
volume = {5},
doi = {10.21105/joss.02445},
number = {53},
journal = {Journal of Open Source Software},
author = {Daniel Lüdecke and Mattan S. Ben-Shachar and Indrajeet Patil and Dominique Makowski},
year = {2020},
pages = {2445},
}

@Article{Makowski2020correlation,
title = {Methods and Algorithms for Correlation Analysis in R.},
author = {Dominique Makowski and Mattan S. Ben-Shachar and Indrajeet Patil and Daniel Lüdecke},
doi = {10.21105/joss.02306},
year = {2020},
journal = {Journal of Open Source Software},
number = {51},
volume = {5},
pages = {2306},
url = {https://joss.theoj.org/papers/10.21105/joss.02306},
}


@article{nakagawa_coefficient_2017,
title = {The coefficient of determination {R}2 and intra-class correlation coefficient from generalized linear mixed-effects models revisited and expanded.},
volume = {14},
issn = {1742-5689, 1742-5662},
url = {https://rsif.royalsocietypublishing.org/lookup/doi/10.1098/rsif.2017.0213},
doi = {10.1098/rsif.2017.0213},
language = {en},
number = {134},
urldate = {2019-02-14},
journal = {Journal of The Royal Society Interface},
author = {Nakagawa, Shinichi and Johnson, Paul C. D. and Schielzeth, Holger},
month = sep,
year = {2017},
pages = {20170213}
}

@book{hox_multilevel_2010,
address = {New York},
edition = {2nd ed},
series = {Quantitative methodology series},
title = {Multilevel analysis: techniques and applications},
isbn = {978-1-84872-845-5 978-1-84872-846-2 978-0-203-85227-9},
shorttitle = {Multilevel analysis},
publisher = {Routledge},
author = {Hox, J. J.},
year = {2010}
}

@book{gelman_data_2007,
address = {Cambridge ; New York},
series = {Analytical methods for social research},
title = {Data analysis using regression and multilevel/hierarchical models},
isbn = {978-0-521-86706-1 978-0-521-68689-1},
publisher = {Cambridge University Press},
author = {Gelman, Andrew and Hill, Jennifer},
year = {2007},
note = {OCLC: ocm67375137},
keywords = {Multilevel models (Statistics), Regression analysis}
}

@Article{lmtest,
title = {Diagnostic Checking in Regression Relationships},
author = {Achim Zeileis and Torsten Hothorn},
journal = {R News},
year = {2002},
volume = {2},
number = {3},
pages = {7--10},
url = {https://CRAN.R-project.org/doc/Rnews/},
}


@Manual{MuMin,
title = {MuMIn: Multi-Model Inference},
author = {Kamil Barton},
year = {2020},
note = {R package version 1.43.17},
url = {https://CRAN.R-project.org/package=MuMIn},
}


@Book{car,
title = {An {R} Companion to Applied Regression},
edition = {Third},
author = {John Fox and Sanford Weisberg},
year = {2019},
publisher = {Sage},
isbn = {9781544336473},
address = {Thousand Oaks {CA}},
url = {https://socialsciences.mcmaster.ca/jfox/Books/Companion/},
}



@article{vuong_likelihood_1989,
title = {Likelihood {Ratio} {Tests} for {Model} {Selection} and {Non}-{Nested} {Hypotheses}},
volume = {57},
issn = {00129682},
url = {https://www.jstor.org/stable/1912557?origin=crossref},
doi = {10.2307/1912557},
number = {2},
urldate = {2021-03-23},
journal = {Econometrica},
author = {Vuong, Quang H.},
month = mar,
year = {1989},
pages = {307}
}

0 comments on commit 239c484

Please sign in to comment.