[R] Firths bias correction for log-linear models

From: <sdfrost_at_ucsd.edu>
Date: Fri 13 Jan 2006 - 07:54:11 EST

Dear R-Help List,

I'm trying to implement Firth's (1993) bias correction for log-linear models. Firth (1993) states that such a correction can be implemented by supplementing the data with a function of h_i, the diagonals from the hat matrix, but doesn't provide further details. I can see that for a saturated log-linear model, h_i=1 for all i, hence one just adds 1/2 to each count, which is equivalent to the Jeffrey's prior, but I'd also like to get bias corrected estimates for other log linear models. It appears that I need to iterate using GLM, with the weights option and h_i, which I can get from the function hatvalues. For logistic regression, this can be performed by splitting up each observation into response and nonresponse, and using weights as described in Heinze, G. and Schemper, M.
(2002), but I'm unsure of how to implement the analogue for log-linear models. A
procedure using IWLS is described by Firth (1992) in Dodge and Whittaker (1992), but this book isn't in the local library, and its $141+ on Amazon. I've tried looking at the code in the logistf and brlr libraries, but I haven't had any
(successful) ideas. Can anyone help me in describing how to implement this in R?


R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html Received on Fri Jan 13 08:03:20 2006

This archive was generated by hypermail 2.1.8 : Fri 03 Mar 2006 - 03:42:03 EST