Is there a function that provides the Fisher information matrix for a generalized linear model? I do not see how to access the off-diagonal matrix elements of the value returned by glm. (I'm particularly interested in logistic regression.) If not, what is a good way to use R to compute Hessians or other partial derivatives of log likelihoods? I would appreciate any guidance. David _______________________________________ David R. Bickel http://davidbickel.com Research Scientist Pioneer Hi-Bred International (DuPont) Bioinformatics 7200 NW 62nd Ave.; PO Box 184 Johnston, IA 50131-0184 515-334-4739 Tel 515-334-4473 Fax david.bickel at pioneer.com This communication is for use by the intended recipient and ...{{dropped}}
David: I don't have what you want. But if your model is simple (2-parameter, binomial response, glm with a logit link) I have some code that computes and plots the loglikelihood surface using contour() and superimposes the asymptotic 95% confidence ellipse, for comparison with the observed contour for qchisq(0.95, df=2)/2. And for many datasets the agreement isn't as nice as you might hope, and that your Hessian might require. (That is, the actually contour is not elliptical, or if it is its axes may not agree well with the pseudo-elliptical contour of the observed loglikelihood surface.) You may be looking for the resulting confidence bounds on the glm fit for which I also have code that iteratively interrogates the loglikelihood surface without plotting it. If any of this is interesting, please send me a note so we won't clog the bandwidth. Charles Annis, P.E. Charles.Annis at StatisticalEngineering.com phone: 561-352-9699 eFax: 614-455-3265 http://www.StatisticalEngineering.com -----Original Message----- From: r-help-bounces at stat.math.ethz.ch [mailto:r-help-bounces at stat.math.ethz.ch] On Behalf Of Bickel, David Sent: Friday, September 29, 2006 1:50 PM To: r-help at stat.math.ethz.ch Subject: [R] GLM information matrix Is there a function that provides the Fisher information matrix for a generalized linear model? I do not see how to access the off-diagonal matrix elements of the value returned by glm. (I'm particularly interested in logistic regression.) If not, what is a good way to use R to compute Hessians or other partial derivatives of log likelihoods? I would appreciate any guidance. David _______________________________________ David R. Bickel http://davidbickel.com Research Scientist Pioneer Hi-Bred International (DuPont) Bioinformatics 7200 NW 62nd Ave.; PO Box 184 Johnston, IA 50131-0184 515-334-4739 Tel 515-334-4473 Fax david.bickel at pioneer.com This communication is for use by the intended recipient and ...{{dropped}} ______________________________________________ R-help at 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 and provide commented, minimal, self-contained, reproducible code.
look at summary.glm(), probably you're looking for fit <- glm(..., family = binomial) # the inverse Fisher Information matrix summary(fit)$cov.scaled I hope it helps. Best, Dimitris -- Dimitris Rizopoulos Ph.D. Student Biostatistical Centre School of Public Health Catholic University of Leuven Address: Kapucijnenvoer 35, Leuven, Belgium Tel: +32/(0)16/336899 Fax: +32/(0)16/337015 Web: http://med.kuleuven.be/biostat/ http://www.student.kuleuven.be/~m0390867/dimitris.htm Quoting "Bickel, David" <DAVID.BICKEL at pioneer.com>:> Is there a function that provides the Fisher information matrix for a > generalized linear model? I do not see how to access the off-diagonal > matrix elements of the value returned by glm. (I'm particularly > interested in logistic regression.) > > If not, what is a good way to use R to compute Hessians or other partial > derivatives of log likelihoods? > > I would appreciate any guidance. > > David > _______________________________________ > David R. Bickel http://davidbickel.com > Research Scientist > Pioneer Hi-Bred International (DuPont) > Bioinformatics > 7200 NW 62nd Ave.; PO Box 184 > Johnston, IA 50131-0184 > 515-334-4739 Tel > 515-334-4473 Fax > david.bickel at pioneer.com > > This communication is for use by the intended recipient and ...{{dropped}} > > ______________________________________________ > R-help at 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 > and provide commented, minimal, self-contained, reproducible code. > >Disclaimer: http://www.kuleuven.be/cwis/email_disclaimer.htm