Re: [R] Robust standard errors in logistic regression

From: Frank E Harrell Jr <f.harrell_at_vanderbilt.edu>
Date: Wed 05 Jul 2006 - 23:01:06 EST

Celso Barros wrote:
> Dear Frank and Achim,
>
> Thanks for the help. But I must be doing something wrong. I tried to do
> as you suggested:

You didn't do everything I suggested. Add x=TRUE, y=TRUE after the formula given to lrm. The output for g will answer your other needs. Frank

>

>> B11<-lrm(HIGH93~HIEDYRS)
>> g<-robcov(B11)

>
> But I got the following message:
>
>
> Error in residuals.lrm(fit, type = if (method == "huber") "score" else
> "hscore") :
> you did not specify y=T in the fit
>
> By the way, I was wondering if there is a way to use rlm (from MASS)
> to estimate robust standard errors for logistic regression? I am more
> familiar with rlm than with packages such as sandwich.
>
> rlm has the big advantage of having a very friendly output, similar to
> the familiar lm output (for instance, it has a clearly located "standard
> errors" column), and (obviously, due to my poor understanding) I find other
> outputs a little bit confusing.
>
> Thanks in advance,
>
> Celso
>
>
> On 7/4/06, Achim Zeileis <Achim.Zeileis@wu-wien.ac.at> wrote:
>> On Tue, 4 Jul 2006 13:14:24 -0300 Celso Barros wrote:
>>
>>> I am trying to get robust standard errors in a logistic regression.
>>> Is there any way to do it, either in car or in MASS?
>> Package sandwich offers various types of sandwich estimators that can
>> also be applied to objects of class "glm", in particular sandwich()
>> which computes the standard Eicker-Huber-White estimate.
>>
>> These robust covariance matrices can be plugged into various inference
>> functions such as linear.hypothesis() in car, or coeftest() and
>> waldtest() in lmtest.
>>
>> See the man pages and package vignettes for examples.
>> Z
>>
>>> Thanks for the help,
>>>
>>>                                           Celso


-- 
Frank E Harrell Jr   Professor and Chair           School of Medicine
                      Department of Biostatistics   Vanderbilt University

______________________________________________
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 Thu Jul 06 00:25:01 2006

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.1.8, at Thu 06 Jul 2006 - 02:18:16 EST.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.