Use the following toy data to illustrate comments in Section 5.5 about grouped versus ungrouped binary data
Question:
Use the following toy data to illustrate comments in Section 5.5 about grouped versus ungrouped binary data in the effect on the deviance:
--------------------------------------------------------
x Number of trials Number of successes 0 4 1 1 4 2 2 4 4 ---------------------------------------------------------
Denote by M0 the null model logit(????i) = ????0 and by M1 the model logit(????i) = ????0 + ????1xi.
a. Create a data file in two ways, entering the data as (i) ungrouped data:
ni = 1, i = 1,…, 12, (ii) grouped data: ni = 4, i = 1, 2, 3. Fit M0 and M1 for each data file. Show that the deviances for M0 and M1 differ for the two forms of data entry. Why is this?
b. Show that the difference between the deviances for M0 and M1 is the same for each form of data entry. Why is this? (Thus, the data file format does not matter for inference, but it does matter for goodness-of-fit testing.)
Step by Step Answer:
Foundations Of Linear And Generalized Linear Models
ISBN: 9781118730034
1st Edition
Authors: Alan Agresti