Usethefollowingtoydatatoillustrateeffectsofgroupedversusungroupedbinarydataonthe estimates andthedevianceforlogisticregressionmodeling: x Numberoftrials Numberofsuccesses 0 4 1 1 4 2 2 4 4 Denote by
Question:
Usethefollowingtoydatatoillustrateeffectsofgroupedversusungroupedbinarydataonthe estimates andthedevianceforlogisticregressionmodeling:
x Numberoftrials Numberofsuccesses 0 4 1 1 4 2 2 4 4 Denote by M0 the null modelandby M1 the modellogit(πi) = β0 + β1xi.
(a) Createadatafileintwoways,enteringthedataas(i)ungrouped: ni = 1, i = 1, ..., 12,
(ii) grouped: ni = 4, i = 1, 2, 3. Fit M0 and M1 for eachdatafile.Comparetheirestimates and se values.
(b) Showthatthedeviancesfor M0 and M1 with thegroupeddataaredifferentwiththe ungroupeddata.Whyisthis?
(c) Showthatthedifferencebetweentheresidualdeviancesfor M0 and M1 is thesamefor the groupedandungroupeddata.Whyisthis?Whatisthisdifferenceusedfor?
Step by Step Answer:
Foundations Of Statistics For Data Scientists With R And Python
ISBN: 9780367748456
1st Edition
Authors: Alan Agresti