2
$\begingroup$

Can $G^2$ statistic of log-linear (unsaturated) model in contingency tables be negative? Since saturated model with perfect fit has $G^2=0$ I don't think the unsaturated models can get negative $G^2$. In need of insight, since I might have run into some miscalculations.

$\endgroup$
1
  • 1
    $\begingroup$ Depending on the order I’ve entered models in some R functions, I’ve run issues like this. $\endgroup$
    – Dave
    Commented May 4, 2020 at 13:36

1 Answer 1

0
$\begingroup$

Note from Wikipedia that the $G^2$-statistic has the form of (twice) a Kullback-Leibler divergence, see Why is Kullback Leibler Divergence always positive?. More precisely $$ \DeclareMathOperator{\KL}{KL} G^2 = 2\sum_i O_i \log\frac{O_i}{E_i}=2N\KL\left(\frac{O_i}{N} || \frac{E_i}{N} \right) $$ where $N$ is the total count. It is also related to the deviance in generalized linear models, and is in fact the Deviance (in R terminology, Null deviance - Residual deviance) in a logistic regression model for the contingency table.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.