<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head><meta http-equiv=Content-Type content="text/html; charset=iso-8859-1"><meta name=Generator content="Microsoft Word 14 (filtered medium)"><!--[if !mso]><style>v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style><![endif]--><style><!--
/* Font Definitions */
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
@font-face
        {font-family:Verdana;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri","sans-serif";
        mso-fareast-language:EN-US;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
p.MsoPlainText, li.MsoPlainText, div.MsoPlainText
        {mso-style-priority:99;
        mso-style-link:"Texto sin formato Car";
        margin:0cm;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri","sans-serif";
        mso-fareast-language:EN-US;}
p.MsoAcetate, li.MsoAcetate, div.MsoAcetate
        {mso-style-priority:99;
        mso-style-link:"Texto de globo Car";
        margin:0cm;
        margin-bottom:.0001pt;
        font-size:8.0pt;
        font-family:"Tahoma","sans-serif";
        mso-fareast-language:EN-US;}
span.EstiloCorreo17
        {mso-style-type:personal-compose;
        font-family:"Calibri","sans-serif";
        color:windowtext;}
span.TextodegloboCar
        {mso-style-name:"Texto de globo Car";
        mso-style-priority:99;
        mso-style-link:"Texto de globo";
        font-family:"Tahoma","sans-serif";}
span.TextosinformatoCar
        {mso-style-name:"Texto sin formato Car";
        mso-style-priority:99;
        mso-style-link:"Texto sin formato";
        font-family:"Calibri","sans-serif";}
.MsoChpDefault
        {mso-style-type:export-only;
        font-family:"Calibri","sans-serif";
        mso-fareast-language:EN-US;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:70.85pt 3.0cm 70.85pt 3.0cm;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]--></head><body lang=ES link=blue vlink=purple><div class=WordSection1><p class=MsoPlainText style='text-align:justify'>Hello everybody, <o:p></o:p></p><p class=MsoPlainText style='text-align:justify'><br>I have estimated a spatial error model by means of the lagsarlm() function. The Breusch-Pagan test for spatial models (bptest.sarlm()) shows heteroskedasticity evidence. I want to estimate robust standard errors, but the functions I have looked at only work with lm type objects. In page 23 in the spdep manual it is stated that "it is also technically possible to make heteroskedasticity corrections to standard error estimates by using the “lm.target” component of sarlm objects – using functions in the lmtest and sandwich packages.", and gives an example that honestly I do not understand (what is $tary and $tarX? what is the lm.target component? where are they documented?). I have adapted the example to my case, obtaining an estimated model with its corresponding coefficients, standard errors, etc. My question is: is this correct? Are these standard errors already robust under heteroskedasticity?<o:p></o:p></p><p class=MsoPlainText style='text-align:justify'><o:p> </o:p></p><p class=MsoPlainText style='text-align:justify'>Thanks a lot in advance<o:p></o:p></p><p class=MsoPlainText style='text-align:justify'><o:p> </o:p></p><p class=MsoPlainText style='text-align:justify'>Best<o:p></o:p></p><p class=MsoPlainText style='text-align:justify'>Javi<o:p></o:p></p><p class=MsoPlainText style='text-align:justify'><o:p> </o:p></p><p class=MsoPlainText style='text-align:justify'>PD: below you can see the piece of code and the generated output<o:p></o:p></p><p class=MsoPlainText style='text-align:justify'><o:p> </o:p></p><p class=MsoPlainText><o:p> </o:p></p><p class=MsoPlainText><span style='font-family:"Courier New"'>reg.SLM <- lagsarlm(precio_m2~z1+z2+z3+z4+z5+z6+z7+z8+z9+z10-1,<o:p></o:p></span></p><p class=MsoPlainText><span style='font-family:"Courier New"'>data=datos,W_n,method="eigen",  tol.solve=1.0e-20) </span><span style='font-family:"Courier New"'><o:p></o:p></span></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal><span style='font-family:"Courier New"'>lm.target <- lm(reg.SEM$tary ~ reg.SEM$tarX - 1)<o:p></o:p></span></p><p class=MsoNormal><span style='font-family:"Courier New"'>if (require(lmtest) && require(sandwich)) {<o:p></o:p></span></p><p class=MsoNormal><span style='font-family:"Courier New"'>coeftest(lm.target, vcov=vcovHC(lm.target, type="HC0"), df=Inf)<o:p></o:p></span></p><p class=MsoNormal><span style='font-family:"Courier New"'>}<o:p></o:p></span></p><p class=MsoNormal><span style='font-family:"Courier New"'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-family:"Courier New"'>z test of coefficients:<o:p></o:p></span></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal><span style='font-family:"Courier New"'>                                         Estimate Std. Error z value  Pr(>|z|)<o:p></o:p></span></p><p class=MsoNormal><span style='font-family:"Courier New"'>reg.SEM$tarXI(x - lambda * WX)z1       1489.27593  124.86303 11.9273 < 2.2e-16<o:p></o:p></span></p><p class=MsoNormal><span style='font-family:"Courier New"'>reg.SEM$tarXI(x - lambda * WX)z2       1471.24060  135.03910 10.8949 < 2.2e-16<o:p></o:p></span></p><p class=MsoNormal><span style='font-family:"Courier New"'>reg.SEM$tarXI(x - lambda * WX)z3       1646.50753  126.03324 13.0641 < 2.2e-16<o:p></o:p></span></p><p class=MsoNormal><span style='font-family:"Courier New"'>reg.SEM$tarXI(x - lambda * WX)z4       1615.11404  232.94826  6.9334 4.110e-12<o:p></o:p></span></p><p class=MsoNormal><span style='font-family:"Courier New"'>reg.SEM$tarXI(x - lambda * WX)z5       1947.56387  149.28017 13.0464 < 2.2e-16<o:p></o:p></span></p><p class=MsoNormal><span style='font-family:"Courier New"'>reg.SEM$tarXI(x - lambda * WX)z6       1903.80428  132.62287 14.3550 < 2.2e-16<o:p></o:p></span></p><p class=MsoNormal><span style='font-family:"Courier New"'>reg.SEM$tarXI(x - lambda * WX)z7       1943.40961  118.29268 16.4288 < 2.2e-16<o:p></o:p></span></p><p class=MsoNormal><span style='font-family:"Courier New"'>reg.SEM$tarXI(x - lambda * WX)z8       2576.77441  144.33295 17.8530 < 2.2e-16<o:p></o:p></span></p><p class=MsoNormal><span style='font-family:"Courier New"'>reg.SEM$tarXI(x - lambda * WX)z9       3037.47241  215.77036 14.0773 < 2.2e-16<o:p></o:p></span></p><p class=MsoNormal><span style='font-family:"Courier New"'>reg.SEM$tarXI(x - lambda * WX)z10      3976.81752  260.71406 15.2536 < 2.2e-16<o:p></o:p></span></p><p class=MsoNormal><span style='font-family:"Courier New"'>                                          <o:p></o:p></span></p><p class=MsoNormal><span style='font-family:"Courier New"'>reg.SEM$tarXI(x - lambda * WX)z1       ***<o:p></o:p></span></p><p class=MsoNormal><span style='font-family:"Courier New"'>reg.SEM$tarXI(x - lambda * WX)z2       ***<o:p></o:p></span></p><p class=MsoNormal><span style='font-family:"Courier New"'>reg.SEM$tarXI(x - lambda * WX)z3       ***<o:p></o:p></span></p><p class=MsoNormal><span style='font-family:"Courier New"'>reg.SEM$tarXI(x - lambda * WX)z4       ***<o:p></o:p></span></p><p class=MsoNormal><span style='font-family:"Courier New"'>reg.SEM$tarXI(x - lambda * WX)z5       ***<o:p></o:p></span></p><p class=MsoNormal><span style='font-family:"Courier New"'>reg.SEM$tarXI(x - lambda * WX)z6       ***<o:p></o:p></span></p><p class=MsoNormal><span style='font-family:"Courier New"'>reg.SEM$tarXI(x - lambda * WX)z7       ***<o:p></o:p></span></p><p class=MsoNormal><span style='font-family:"Courier New"'>reg.SEM$tarXI(x - lambda * WX)z8       ***<o:p></o:p></span></p><p class=MsoNormal><span style='font-family:"Courier New"'>reg.SEM$tarXI(x - lambda * WX)z9       ***<o:p></o:p></span></p><p class=MsoNormal><span style='font-family:"Courier New"'>reg.SEM$tarXI(x - lambda * WX)z10      ***<o:p></o:p></span></p><p class=MsoNormal><span style='font-family:"Courier New"'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-family:"Courier New"'>---<o:p></o:p></span></p><p class=MsoNormal><span style='font-family:"Courier New"'>Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1<o:p></o:p></span></p><p class=MsoNormal><o:p> </o:p></p><table class=MsoNormalTable border=0 cellspacing=3 cellpadding=0 width="86%" style='width:86.58%;background:white'><tr><td style='padding:3.75pt 3.75pt 3.75pt 3.75pt'></td></tr><tr><td width="99%" style='width:99.04%;background:black;padding:3.75pt 3.75pt 3.75pt 3.75pt'><table class=MsoNormalTable border=0 cellspacing=3 cellpadding=0 width="100%" style='width:100.0%'><tr><td width="55%" style='width:55.0%;padding:.75pt .75pt .75pt .75pt'><p class=MsoNormal><b><span style='font-size:8.5pt;font-family:"Verdana","sans-serif";color:white;mso-fareast-language:ES'>JAVIER GARCÍA </span></b><b><span style='font-size:8.5pt;font-family:"Verdana","sans-serif";color:white;mso-fareast-language:ES'><o:p></o:p></span></b></p><p class=MsoNormal><b><span style='font-size:8.5pt;font-family:"Verdana","sans-serif";color:white;mso-fareast-language:ES'><o:p> </o:p></span></b></p><p class=MsoNormal><b><span style='font-size:8.5pt;font-family:"Verdana","sans-serif";color:white;mso-fareast-language:ES'>Departamento de Economía Aplicada III (Econometría y Estadística)<o:p></o:p></span></b></p><p class=MsoNormal><b><span style='font-size:8.5pt;font-family:"Verdana","sans-serif";color:white;mso-fareast-language:ES'>Facultad de Economía y Empresa (Sección Sarriko)</span></b><span style='color:#1F497D;mso-fareast-language:ES'><br></span><span style='font-size:7.0pt;font-family:"Verdana","sans-serif";color:white;mso-fareast-language:ES'>Avda. Lehendakari Aguirre 83</span><span style='font-size:7.0pt;color:#1F497D;mso-fareast-language:ES'><o:p></o:p></span></p><p class=MsoNormal><span style='font-size:7.0pt;font-family:"Verdana","sans-serif";color:white;mso-fareast-language:ES'>48015 BILBAO<br><b>T.: +34 601 7126</b> <b>F.: +34 601 3754</b><br></span><span style='color:#1F497D;mso-fareast-language:ES'><a href="http://www.ehu.es/"><b><span style='font-size:7.0pt;font-family:"Verdana","sans-serif";color:white'>www.ehu.es</span></b></a> </span><span style='font-size:12.0pt;color:#1F497D;mso-fareast-language:ES'><o:p></o:p></span></p></td><td width="45%" valign=top style='width:45.0%;padding:.75pt .75pt .75pt .75pt'><p class=MsoNormal align=right style='text-align:right'><span style='color:#1F497D;mso-fareast-language:ES'><img border=0 width=482 height=74 id="Imagen_x0020_1" src="cid:image001.gif@01D32838.B160D830" alt="http://www.unibertsitate-hedakuntza.ehu.es/p268-content/es/contenidos/informacion/manual_id_corp/es_manual/images/firma_email_upv_euskampus_bilingue.gif"></span><span style='font-size:12.0pt;color:#1F497D;mso-fareast-language:ES'><o:p></o:p></span></p></td></tr></table></td></tr></table><p class=MsoNormal><span style='mso-fareast-language:ES'><o:p> </o:p></span></p><p class=MsoNormal><o:p> </o:p></p></div></body></html>