Skip to contents

Source: Hedderich, Sachs and Reynarowych, Applied Statistics: Methods Using R, section 8.4.6 "Pseudo Coefficients of Determination", printed pages 838-839, equations (8.70), (8.71) and (8.72): R2_McF = 1 - LLmod / LL0, R2_CS = 1 - (L0 / Lmod)^(2/n) and R2_N = R2_CS / (1 - L0^(2/n)).

Usage

Pseudor2(llmod, llnull, n)

Arguments

llmod

Maximised log-likelihood of the model under assessment.

llnull

Maximised log-likelihood of the intercept-only model; must be strictly negative.

n

Number of observations the model was fitted on.

Value

list: mcfadden, coxsnell, nagelkerke, coxsnell_max, llmod, llnull, n.

Details

Written on the log scale here so that L0 and Lmod never underflow: R2_CS = 1 - exp(2 (LL0 - LLmod) / n) and R2_N = R2_CS / (1 - exp(2 LL0 / n)).

The book records the ranges: 0 <= R2_McF < 1 (below 0.2 low, above 0.4 a significant improvement) and 0 <= R2_CS < 1, with R2_N normalised so that 1 is attainable (above 0.2 acceptable, above 0.5 very good).

Examples

Pseudor2(-20.31519 / 2, -28.26715 / 2, 23)$mcfadden
#> [1] 0.2813145