Skip to content

After heteroskedasticity correction, how can I get new confidential interval?

4 messages · Andrew Miles, JoonGi, Achim Zeileis

#
I just corrected std.error of my 'model'(Multi Regression).
Then how can I get new t and p-values?
Isn't there any R command which shows new t and p values?
#
It is hard to say without knowing more about the type of model you are  
running.

A good place to look would be at the coeftest() function in the  
package lmtest.

Andrew Miles
On Dec 20, 2010, at 10:04 AM, JoonGi wrote:

            
#
First of all, thanks for your guide!

Let me be more specific, here.

Using
data(Housing) from Ecdat library

I ran a regression
raw.model<-lprice~llot+lbed+lbath+lsto+factor(driveway)+factor(recroom)+factor(fullbase)+factor(gashw)+factor(airco)+factor(prefarea)+factor(garagepl)
coeftest(lm(raw.model))

and I got heteroskedasticity in significant level 5% such as below.
bptest(lm(raw.model))

So, I corrected like this.
sqrt(diag(hccm(lm(raw.model),type="hc1")))

This gave me the corrected std.errors.
jointly significant since the new std.error will change
coeftest(lm(raw.model))'s t, p and F value.

Then, How can I get these new t, p, F? Is there any R command for this?
#
On Mon, 20 Dec 2010, JoonGi wrote:

            
You can team up coeftest() with other "vcov" functions, such as hccm() 
from "car" or vcovHC() from the "sandwich" package. Actually, there is an 
example on ?coeftest for the latter.

Also, there are various worked examples in

   vignette("sandwich", package = "sandwich")

Best,
Z