[R-sig-Geo] How to access p-values of lagsarlm coefficients?
Roger Bivand
Roger.Bivand at nhh.no
Thu Apr 30 18:33:15 CEST 2009
On Thu, 30 Apr 2009, Danlin Yu wrote:
> Michael:
>
> For the SARLM objects (be it lag or error), the p-values are replaced by the
> calculated z-values, and significance tests follow similar ways as in using
> the p-values.
>
> Hope this helps.
>
> Cheers,
> Danlin
>
> Loechl Michael ??:
>> Dear list,
>>
>>
>> is there a way to access the p-values of the coefficients in a
>> sarlm-object?
>>
Try:
library(spdep)
data(oldcol)
COL.lag.eig <- lagsarlm(CRIME ~ INC + HOVAL, data=COL.OLD,
nb2listw(COL.nb, style="W"))
summary(COL.lag.eig)$Coef
summary(COL.lag.eig)$Coef[,4]
that is, get them from the object returned by summary() of the sarlm
object for the regression coefficients. For rho, you have the LR test
anyway, at:
c(summary(COL.lag.eig)$LR1$p.value)
(inside c() to drop unneeded attributes), and if method="eigen", you also
have the p.value of the Wald statistic, which is the same as the
asymptotic test on rho, even though computed differently:
c(summary(COL.lag.eig)$Wald1$p.value)
Does that give you what you need?
Roger
>>
>> Any hint is appreciated.
>>
>>
>> Best regards,
>>
>> Michael
>>
>>
>>
>> [[alternative HTML version deleted]]
>>
>> _______________________________________________
>> R-sig-Geo mailing list
>> R-sig-Geo at stat.math.ethz.ch
>> https://stat.ethz.ch/mailman/listinfo/r-sig-geo
>>
>
>
--
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