Open alexpghayes opened 6 years ago
fitted
logLik
Things that would be nice to do: likelihood ratio tests for mixed models
Why don't nls
and lm
have the same interface? Would it make sense to have access to these both at once?
Would be good to make a list of methods that models should have and define their behavior as a community standard.
car::linearHypothesis
anova
(type I)
anova
(type II)
anova
(type III)
Well and vcov methods (calculated numerically if need be if no closed-form formula exists) and a formula interface, which would both be needed to have packages like glmnet supported by emmeans or marginaleffects (well, I think there is a formula interface if you use glmnet via caret).
More and more I find myself using a bizarre mixture of
lm
,glm
,glmnet
,sandwich
(HC1 standard errors), andlme4/rstanarm
(mixed models) when working with a set of models that are only slightly different. If I were less lazygrpreg
would also feature heavily in this mix for the group lasso implementation.Additionally, my impression is that packages for penalized regression have widely varying interfaces. See for example:
glmnet
grpreg
penalized
I'm less interested in the precise interface for model fitting, since I already have some opinions on how that should be done, but rather on the helpers of various types for probing fit models. In particular, I think it would be useful to look at (conceptually) overloaded operators (i.e. plot methods that plot different stuff for the same model) as a place to potential uncover new modelling verbs that have been explicitly differentiated from the standard set of methods for probing models in R.
Related: what I presume to be the standard set of methods for probing models in R:
print
summary
plot
coef
residuals
predict
As a reference