Comments (28)
I was teaching yesterday and I was called out by students "You don't have delta-R2 available??"
This is embarrassing guys....
from performance.
I guess that would make sense as models' performance indices are very often used to compare models... I wonder about the syntax tho, do we need something implicit like r2(..., named_args)
with wich which we could do r2(model1, model2, model3, named_arg=FALSE)
or is it better to leave the current behaviourand accept lists of models as the first argument r2(c(model1, model2, model3), named_arg=FALSE)
.
This could be later extended to model_performance()
(or a new compare_performance
? that would open a new types of functions compare_*
), that would compute and compare or possibles indices (i.e., all indices that are compatible with all the models)
from performance.
I suggest implementing this in compare_performance()
as R2_delta
for linear models only (the only ones for which this really makes sense (As for GLMs the total "variance" on the latent scale increases with model complexity... which is weird...).
We might then also add Cohens_f2
:
from performance.
Maybe compare_models()
is better located in report, and both includes parameters and performance indices
from performance.
Currently, r2()
is defined as r2 <- function(model, ...) {
. I would say we just make it r2(...)
(or probably r2(x, ...)
) and capture the models with list(...)
or so inside the function.
from performance.
Agreed.
For the sake of flexibility, we might want to check the provided arguments, to see if they are (compatible) models (i.e. statistical models). Maybe we could add a small is_model
in insight, and run this check on the provided arguments in r2(...)
(models_to_compare <- allargsinellipsis[is_model(allargsinellipsis)]
to increase stability?
from performance.
Sounds good! is_model()
would be a long list of inherits()
-commands, I guess ;-)
For comparison, should we also check if all models are of the same type? (i.e. no mixing from lm, glm, coxph etc.)
from performance.
I think we should check the input with all_models_equal() because it makes no sense to compare r-squared values from different distributional families.
from performance.
Might be something for later than initial release... It requires some work esp. for more complex R2 measures like Bayes or Nakagawa.
from performance.
Agree, this can be improved later on
from performance.
The R2 diff could nicely fit in test_performance especially if there are any CI/significance that we could derive from it 😏
I wonder if, in general, we should have a difference_performance()
utility function or a difference=TRUE
arg in compare_performance()
that just displays the difference instead of the raw indices? (which basically sapply(compare_performance, diff)
)
from performance.
we should have a difference_performance()
No.
or a difference=TRUE arg in compare_performance() that just displays the difference instead of the raw indices?
Difference to what? Models as entered in their order? I'm not sure this is informative for most indices, is it?
from performance.
Olkin, Alf, and Graf have each variously developed CIs of various flavors for R2 differences.
from performance.
Haha. Tell your students that it's honestly not a clear problem to solve when you aren't incorporating the incremental validity into your model (ala some specific SEM models) or via bootstrapping 😜
from performance.
We should definitely have some difference-related capabilities, and R2 seems like the best place to start
from performance.
∆R^2^ and ∆R and √∆R are all good statistics to that end. As a start, bootstrapping would be a great method for intervals/p. (Honestly, they are often the best estimators compared to delta-method; proper analytic are a pain).
from performance.
Is this a valid or useful measure at all?
https://twitter.com/brodriguesco/status/1461604815759417344?s=20
from performance.
That tweet is just referencing the distinction between R2 and adjusted/cross-validated R2
from performance.
cross-validated R2?
from performance.
Out of sample R2 (either actually computed in a hold out sample or via leave-one-out or via an analytic approximation)
from performance.
from performance.
not sure why this is out of sample/cross validated, since predictors are added, but no additional / different data sets?
from performance.
I mean that his tweet is lamenting that in-sample R2 is positively biased. It is absolutely meaningful to compare models on R2--the solution to his concern is that an unbiased R2 estimator should be used.
from performance.
Ah, ok. Was a bit confused, because we were not discussing cross validated R2 here.
from performance.
Saw a recent tweet where @bwiernik mentioned R2 differences, I'd suggest implementing it first in a function called test_r2()
, and then perhaps incorporated in test_performance()
from performance.
And then compare_models()
from performance.
compare_performance()
;-)
compare_models()
is an alias for compare_parameters()
(and hence, located in parameters)
from performance.
That would be less confusing
from performance.
Related Issues (20)
- JOSE Review - 221: Text Clarity HOT 3
- JOSE Review - 221: Contextualize Examples HOT 2
- JOSE Review - 221 HOT 5
- Model Performance for oohbchoice class models HOT 12
- check_model() shows nothing on some PCs HOT 7
- How to turn off CIs for check_model?
- posterior predictive check for binomial glm with matrix response HOT 5
- problem with binned residuals with version 0.10.7
- Warning message In stats::qlogis(mu) : NaNs produced for ordbeta GLMM when calculating R2 HOT 2
- [Proposal] Support for mmrm ang geepack::geeglm
- New error in `check_model()`: `Error in match.arg(bandType, c("pointwise", "boot", "ts", "ks")): 'arg' should be one of "pointwise", "boot", "ts", "ks"` HOT 6
- performance::r2_nakagawa() and r.squaredGLMM() give different values for Gaussian glmmTMB models without random effects HOT 4
- wonky plot from `check_model()` on a `glmmTMB` example HOT 24
- Examples for `{BayesFactor}` are failing
- `check_model`: add title and save plot HOT 5
- Simple glms no longer supported? HOT 2
- Checking outliers paper: BRM review discussion HOT 23
- Missing variable when using the check_collinearity() function for zero-augmented glmmTMB (hurdle, zi) HOT 4
- Errors in using r2_kullback HOT 1
- support for quantile regression and mixed effects quantile regression
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from performance.