Dear R-users, has anybody combined the glm function with the Newey-West estimator of variance, similar as in Stata 7.0? I'd like to estimate corrected standard errors within a logistic regression model, taking into account the auto-correlated binary observations within individuals. I use R1.5.1 on Mac OS X (10.2). Thanks, Christof -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or "[un]subscribe" (in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
On Tue, 15 Oct 2002, Christof Bigler wrote:> Dear R-users, > > has anybody combined the glm function with the Newey-West estimator of > variance, similar as in Stata 7.0? I'd like to estimate corrected > standard errors within a logistic regression model, taking into account > the auto-correlated binary observations within individuals. > I use R1.5.1 on Mac OS X (10.2). >There is code at http://faculty.washington.edu/tlumley/weave.html (as you will see there is also code to do this for Stata 5.0 -- I suspect I was responsible for Stata realising that the Newey-West estimator works with glms) -thomas -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or "[un]subscribe" (in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
On Tue, 15 Oct 2002, Christof Bigler wrote:> Dear R-users, > > has anybody combined the glm function with the Newey-West estimator of > variance, similar as in Stata 7.0? I'd like to estimate corrected > standard errors within a logistic regression model, taking into account > the auto-correlated binary observations within individuals. > I use R1.5.1 on Mac OS X (10.2). > > Thanks, > ChristofAlternatively, you may try package geepack, which can model the ar1 correlation structure within a cluster. I am not sure if this Newey-West estimator is the same as the "sandwich" variance estimator though. Maybe someone knows this better can explain. Jun Yan Department of Statistics Office: CSSC 4252 university of Wisconsin-Madison Tel: (608)262-7478 1210 W. Dayton St. Email: jyan at stat.wisc.edu Madison, WI 53706 URL: http://www.stat.wisc.edu/~jyan -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or "[un]subscribe" (in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._