two models and generating the ANOVA tables for them. The calculation for the partial R2 is which is analogous to the usual coefficient of determination: Generalizing and decomposing R2 As explained above, model selection heuristics such as the Adjusted criterion and the F-test examine whether the total sufficiently increases to determine if a new regressor should be added to the model. If a regressor is added to the model that is highly correlated with other regressors which have already been included, then the total will hardly increase, even if the new regressor is of relevance. As a result, the above-mentioned heuristics will ignore relevant regressors when cross-correlations are high. Alternatively, one can decompose a generalized version of to quantify the relevance of deviating from a hypothesis. As Hoornweg (2018) shows, several shrinkage estimators – such as Bayesian linear regression, ridge regression, and the (adaptive) lasso – make use of this decomposition of when they gradually shrink parameters from the unrestricted OLS solutions towards the hypothesized values. Let us first define the linear regression model as It is assumed that the matrix is standardized with Z-scores and that the column vector is centered to have a mean of zero. Let the column vector refer to the hypothesized regression parameters and let the column vector denote the estimated parameters. We can then define An of 75% means that the in-sample accuracy improves by 75% if the data-optimized solutions are used instead of the hypothesized values. In the special case that is a vector of zeros, we obtain the traditional again. The individual effect on of deviating from a hypothesis can be computed with ('R-outer'). This times matrix is given by where . The diagonal elements of exactly add up to . If regressors are uncorrelated and is a vector of zeros, then the diagonal element of simply corresponds to the value between and . When regressors and are correlated, might increase at the cost of a decrease in . As a result, the diagonal elements of may be smaller than 0 and, in more exceptional cases, larger than 1. To deal with such uncertainties, several shrinkage estimators implicitly take a weighted average of the diagonal elements of to quantify the relevance of deviating from a hypothesized value. Click on the lasso for an example. R2 in logistic regression In the case of logistic regression, usually fit by maximum likelihood, there are several