Lutz Ph. Breitling
2004-Jun-02 10:52 UTC
[R] poisson regression with robust error variance ('eyestudy')
Dear all, i am trying to redo the 'eyestudy' analysis presented on the site http://www.ats.ucla.edu/stat/stata/faq/relative_risk.htm with R (1.9.0), with special interest in the section on "relative risk estimation by poisson regression with robust error variance". so i guess rlm is the function to use. but what is its equivalent to the glm's argument "family" to indicate 'poisson'? or am i somehow totally wrong and this is not applicable here? thx a lot- lutz ============================Lutz Ph. Breitling, CMd Unit? des Recherches M?dicale H?pital Albert Schweitzer B.P. 118 Lambar?n? (GABON) -------------- next part -------------- ---
Thomas Lumley
2004-Jun-02 14:36 UTC
[R] poisson regression with robust error variance ('eyestudy')
On Wed, 2 Jun 2004, Lutz Ph. Breitling wrote:> Dear all, > > i am trying to redo the 'eyestudy' analysis presented on the site > http://www.ats.ucla.edu/stat/stata/faq/relative_risk.htm > with R (1.9.0), with special interest in the section on "relative risk > estimation by poisson regression with robust error variance". > > so i guess rlm is the function to use. but what is its equivalent to the > glm's argument "family" to indicate 'poisson'? or am i somehow totally > wrong and this is not applicable here? >No, no. You want glm() and then a function to compute the robust covariance matrix (there's robcov() in the Hmisc package), or use gee() from the "gee" package or geese() from "geepack" with independence working correlation. These are not outlier-resistant estimates of the regression coefficients, they are model-agnostic estimates of the standard errors. Stata is unusual in providing these covariance matrix estimates for just about every regression estimator. I think R should consider doing something similar, but haven't got around to it. -thomas> thx a lot- > lutz > > > ============================> Lutz Ph. Breitling, CMd > Unit侀 des Recherches M侀dicale > H侓pital Albert Schweitzer > B.P. 118 Lambar侀n侀 (GABON) >Thomas Lumley Assoc. Professor, Biostatistics tlumley at u.washington.edu University of Washington, Seattle
(Ted Harding)
2008-May-08 13:38 UTC
[R] poisson regression with robust error variance ('eyestudy
The below is an old thread: On 02-Jun-04 10:52:29, Lutz Ph. Breitling wrote:> Dear all, > > i am trying to redo the 'eyestudy' analysis presented on the site > http://www.ats.ucla.edu/stat/stata/faq/relative_risk.htm > with R (1.9.0), with special interest in the section on "relative > risk estimation by poisson regression with robust error variance". > > so i guess rlm is the function to use. but what is its equivalent > to the glm's argument "family" to indicate 'poisson'? or am i > somehow totally wrong and this is not applicable here? > > thx a lot- > lutz > ============================> Lutz Ph. Breitling, CMd > Unit? des Recherches M?dicale > H?pital Albert Schweitzer > B.P. 118 Lambar?n? (GABON)It seems it may have led to a solution. However, I have tried to trace through the thread in the R-help archives, and have failed to find anything which lays out how a solution can be formulated.[*] I'm interested in the same question. Basically, if I fit a GLM to Y=0/1 response data, to obtain relative risks, as in GLM <- glm(Y ~ A + B + X + Z, family=poisson(link=log)) I can get the estimated RRs from RRs <- exp(summary(GLM)$coef[,1]) but do not see how to implement confidence intervals based on "robust error variances" using the output in GLM. If there was a solution arrived at, can someone spell it out for me, please? With thanks, Ted. [*] PS: I did the "R Site Help and Archive Search" on "eyestudy", and got 18 hits, of which 6 were postings on that thread. However, despite the fact that I requested the results to be sorted "by date, earliest on top", they seem to come out in somewhat random order: Sat Jun 5 14:47:26 2004 (Frank E. Harrell) Wed Jun 9 13:06:04 2004 (Lutz Ph. Breitling) Sat Jun 5 13:51:45 2004 (Lutz Ph. Breitling) Wed Jun 2 18:24:54 2004 (Frank E. Harrell) Wed Jun 2 12:44:45 2004 (Lutz Ph. Breitling) [the initial posting] Wed Jun 2 16:36:43 2004 (Thomas Lumley) This made it difficult to follow the thread, and indeed I wonder if all the postings have been found. Does Namazu have problems in this respect? (And, if I click on "How to search", I get the response "You don't have permission to access /namazu.html on this server.") And, if I click on "Contemporary messages sorted: ... by thread" I get the response: "The requested URL /R/Rhelp02a/archive/index.html was not found on this server." -------------------------------------------------------------------- E-Mail: (Ted Harding) <Ted.Harding at manchester.ac.uk> Fax-to-email: +44 (0)870 094 0861 Date: 08-May-08 Time: 14:38:36 ------------------------------ XFMail ------------------------------