[Openspace] hetereoscedasticity test in R

Anish Neupane aneupane at ualberta.ca
Wed Apr 28 20:29:09 CDT 2004


Hi Baris,

Normally  in OLS, one of the assumption is homoscedascity (equal error 
variance across 
all explanators), this is often violated.  If this is not corrected, it leads 
to inefficient 
parameter estimates....ie, coefficient for uncorrected explanator could be 
0.05 while 
corrected is in fact 0.03.  It is fairly easy to correct for hetereoscedascity 
in OLS but I have 
yet to come across if this problem is relevant to spatial lag parameter, rho.

Anish


>===== Original Message From Baris M Kazar <kazar at ece.umn.edu> =====
>Hi Anish,-
> what do you mean by "doesn't correct for hetereoskedasticity"?
>thanks,
>baris
>
>On Wed, 28 Apr 2004, Anish Neupane wrote:
>
>//Hi all,
>//
>//Does anyone have some ideas to the resolve the hetereoscedasticity issues 
in
>//spatial lag parameter?  Basically, in the model: y =pWy +XB + e, is p 
affected
>//by hetereoscedasticity, if it is there a way to correct for it?  Please see
>//details below.
>//
>//
>//>===== Original Message From Roger.Bivand at nhh.no =====
>//On Wed, 28 Apr 2004, Anish Neupane wrote:
>//
>//> Hi,
>//>
>//> Does the function you describe below, in R, correct for 
hetereoscedasticity
>//as
>//> well detect it.  Geoda indicates a spatial lag (based on LM test) but as 
far
>//I
>//> know doesn't correct for hetereoskedasticity.  My question is in the 
model:
>//y
>//> = pWy +XB + e; is p affected by hetereoscedasticity? If not, can I use 
het
>//> corrected B coefficient from OLS (without spatial lag), use p, and Wy 
from
>//> uncorrected OLS (spatial lag) to come up with y?  I might be streching
>//> econometric principles a bit too far, but like Mario I find that info on
>//> hetereoscedasticity in this field is somewhat sparse. Thanks.
>//
>//Ideally, tracking the hetereoscedasticity would involve finding the
>//missing variable(s), or changing the specification (some kind of mixed
>//model perhaps). The bptest.sarlm() function just tests. It may be possible
>//to "fake" hetereoscedasticity-corrected standard errors for the betas by
>//using hccm() from the car package on the $lm.target object returned in
>//sarlm objects to get the covariance matrix, then the standard errors and
>//correlations:
>//
>//library(car)
>//library(spdep)
>//example(lagsarlm)
>//summary(COL.lag.eig, correlation=TRUE)
>//bptest.sarlm(COL.lag.eig)
>//hccm(COL.lag.eig$lm.target, "hc0")
>//sqrt(diag(hccm(COL.lag.eig$lm.target, "hc0")))
>//
>//as a very rough start. This is treating the GLS with rho fixed as OLS, and
>//so rules out heteroscedasticity in the rho. Looks interesting to work up,
>//maybe we should ask on the openspace or R-sig-geo lists, or somewhere
>//else?
>//
>//Best wishes,
>//
>//Roger
>//
>//>
>//>
>//> >===== Original Message From Roger.Bivand at nhh.no =====
>//> On Fri, 23 Apr 2004, Mario Gellrich wrote:
>//>
>//> > Hi,
>//> >
>//> > I am new to this forum and have a simple question regarding tests on
>//> > heteroscedasticity in spatial linear models (LMlag and LMerr). In Luc
>//> > Anselin's SpaceStat program there is a variety of tests on
>//> > heteroscedasticity (breusch pagan and its studentized version called
>//> > koenker-basset). I found some spatial econometric studies that ignored
>//this
>//> > test, but I think it is important. Since I do not use SpaceStat but 
spdep,
>//> > my question is, is there anybody, who can give me some tips how to 
write
>//> > functions for this test for spatial lag and error models in Roger 
Bivands
>//> > spdep package ? Maybe there is an alternative test in spdep that I have
>//> > overlooked :-).
>//> >
>//> No, not overlooked, but the new release for R 1.9.0 (0.2-14) has
>//> bptest.sarlm() to do this, based on bptest() in the lmtest package - this
>//> is studentized by default. Please let me know if this helps.
>//>
>//> Roger Bivand
>//>
>//>
>//> > Best regards
>//> >
>//> > Mario
>//> >
>//> > _______________________________________________
>//> > Openspace mailing list
>//> > Openspace at sal.agecon.uiuc.edu
>//> > http://sal.agecon.uiuc.edu/mailman/listinfo/openspace
>//> >
>//>
>//> --
>//> Roger Bivand
>//> Economic Geography Section, Department of Economics, Norwegian School of
>//> Economics and Business Administration, Breiviksveien 40, N-5045 Bergen,
>//> Norway. voice: +47 55 95 93 55; fax +47 55 95 93 93
>//> e-mail: Roger.Bivand at nhh.no
>//>
>//>
>//> _______________________________________________
>//> Openspace mailing list
>//> Openspace at sal.agecon.uiuc.edu
>//> http://sal.agecon.uiuc.edu/mailman/listinfo/openspace
>//>
>//> Anish Neupane
>//> Graduate Student
>//> Department of Rural Economy
>//> University of Alberta
>//> 515 General Services Building
>//> Edmonton, AB
>//> Canada T6G 2H1
>//> aneupane at ualberta.ca
>//>
>//>
>//
>//--
>//Roger Bivand
>//Economic Geography Section, Department of Economics, Norwegian School of
>//Economics and Business Administration, Breiviksveien 40, N-5045 Bergen,
>//Norway. voice: +47 55 95 93 55; fax +47 55 95 93 93
>//e-mail: Roger.Bivand at nhh.no
>//
>//Anish Neupane
>//Graduate Student
>//Department of Rural Economy
>//University of Alberta
>//515 General Services Building
>//Edmonton, AB
>//Canada T6G 2H1
>//aneupane at ualberta.ca
>//
>//_______________________________________________
>//Openspace mailing list
>//Openspace at sal.agecon.uiuc.edu
>//http://sal.agecon.uiuc.edu/mailman/listinfo/openspace
>//
>
>--Baris Mustafa Kazar
> Electrical and Computer
> Engineering Department
> University of Minnesota
> 200 Union St SE
> Minneapolis,MN 55455 USA
> Phone: +1 612 624 8545
> Email: kazar at ece.umn.edu

Anish Neupane
Graduate Student
Department of Rural Economy
University of Alberta
515 General Services Building
Edmonton, AB
Canada T6G 2H1
aneupane at ualberta.ca



More information about the Openspace mailing list