[R-sig-Geo] Models

Roger Bivand Roger.Bivand at nhh.no
Mon Nov 17 23:36:19 CET 2008


On Mon, 17 Nov 2008, Raphael Saldanha wrote:

> Hi!
>
> Running some models, I'm having, pratically, the same results with the
> models *spautolm(TX07 ~ X35A39 + TXPIB05, data=mg, family="SAR",
> listw=rook_Ww)* and *errorsarlm(TX07 ~ X35A39 + TXPIB05, data=mg,
> listw=rook_Ww)*. And looking the help don't helpe a lot... so, what are the
> basically differences between spautolm with SAR and errorsarlm, and what
> conclusions can I reach with similar results?

spautolm() is a re-implementation of errorsarlm(), adding support for 
weights and for CAR and SMA. So the "similarity" of results is by design, 
they are doing exactly the same thing, but written in a more general way 
in spautolm(). There are differences in the summary methods, so the model 
output looks a bit different, but only in appearance and internal 
structure, not in the methods being implemented.

Hope this helps,

Roger

>
>> summary(mg_sar)
>
> Call: spautolm(formula = TX07 ~ X35A39 + TXPIB05, data = mg, listw =
> rook_Ww,     family = "SAR")
>
> Residuals:
>     Min       1Q   Median       3Q      Max
> -17.4249  -3.2110  -1.3689   1.7380  47.3231
>
> Coefficients:
>             Estimate Std. Error z value Pr(>|z|)
> (Intercept) -2.668712   2.999516 -0.8897 0.373619
> X35A39       1.332412   0.417628  3.1904 0.001421
> TXPIB05     -0.055142   0.024987 -2.2068 0.027326
>
> Lambda: 0.70216 LR test value: 348.09 p-value: < 2.22e-16
>
> Log likelihood: -2859.839
> ML residual variance (sigma squared): 42.561, (sigma: 6.5239)
> Number of observations: 853
> Number of parameters estimated: 5
> AIC: 5729.7
>
> ############
>
>> summary(mg_errorsar)
>
> Call:errorsarlm(formula = TX07 ~ X35A39 + TXPIB05, data = mg, listw =
> rook_Ww)
>
> Residuals:
>     Min       1Q   Median       3Q      Max
> -17.4249  -3.2110  -1.3689   1.7380  47.3231
>
> Type: error
> Coefficients: (asymptotic standard errors)
>             Estimate Std. Error z value Pr(>|z|)
> (Intercept) -2.668712   2.999516 -0.8897 0.373619
> X35A39       1.332412   0.417628  3.1904 0.001421
> TXPIB05     -0.055142   0.024987 -2.2068 0.027326
>
> Lambda: 0.70216 LR test value: 348.09 p-value: < 2.22e-16
> Asymptotic standard error: 0.030286 z-value: 23.185 p-value: < 2.22e-16
> Wald statistic: 537.52 p-value: < 2.22e-16
>
> Log likelihood: -2859.839 for error model
> ML residual variance (sigma squared): 42.561, (sigma: 6.5239)
> Number of observations: 853
> Number of parameters estimated: 5
> AIC: 5729.7, (AIC for lm: 6075.8)
>
>

-- 
Roger Bivand
Economic Geography Section, Department of Economics, Norwegian School of
Economics and Business Administration, Helleveien 30, N-5045 Bergen,
Norway. voice: +47 55 95 93 55; fax +47 55 95 95 43
e-mail: Roger.Bivand at nhh.no




More information about the R-sig-Geo mailing list