Discussion: View Thread

Correct formula for the null deviance of Binomial regression

  • 1.  Correct formula for the null deviance of Binomial regression

    Posted 04-16-2013 23:35
    This message has been cross posted to the following eGroups: Young Professionals Group and Statistical Consulting Section .
    -------------------------------------------

    Hello:

    Could you possibly help me with the deviance formula for the binomial model.

    Suppose y_i ~ Bi(n_i, p_i), i from 1 to N.

    The deviance formula is well known, i.e. in Dobson on p 77:

    D = 2 * sum(i from 1 to N) of two terms:

    1) y_i * log(y_i / fitted y_i)
    2) A similar term for non-occurences, i.e. (n_i - y_i).

    I am interested in computing the deviance for the null model, when the fitted value of p_i does not depend on i. Denote it p_0. In that case, the first term under the sum becomes 

    y_i * log(p_i / p_0)

    where p_i is the fitted probability for the saturated model, p_i = y_i / n_i;

    The corresponding test is callled Likelihood Ratio in, this SAS output (statistic = 71.05):

    http://www.ats.ucla.edu/stat/sas/output/sas_logit_output.htm

    Now here's the problem: I came across a white paper where D is computed based only on the first term (it doesn't derive the result). The second term that describes the non-occurrences is not there. I checked manually vs both SAS and R and the formula works. So I am wondering where the second term has gone. I tried to derive it myself, but the second term doesn't cancel out.

    -------------------------------------------
    Regards,
    Nik

    -------------------------------------------