[R-sig-Geo] contradicting measures based on Log likelihood and AIC in spatial models
Roger Bivand
Roger.Bivand at nhh.no
Sun Dec 19 14:18:10 CET 2010
On Sun, 19 Dec 2010, elaine kuo wrote:
> Dear List,
>
>
>
> I am running generalized linear models considering spatial autocorrelation.
>
> (Moran? s I = 0.52)
Was this using lm.morantest() - it should have been?
>
> (sample size 4873, explanatory variable number: 6)
>
>
>
> After trying SAR and CAR in package spdep, the results are as followed.
>
Neither of the fits are credible, as the line search has terminated in
both cases at its upper limit. These is something seriously wrong with
your analysis. Which method= argument were you using, presumably in
spautolm? You did not quote the exact way in which you called the
functions used - this will be where your problems lie.
Are you using a weights matrix with very small values (and very small row
sums), and a sparse matrix method? Do you get different outcomes if you
set the search interval yourself - or accept the default and
row-standardise the weights (style="W" in nb2listw)? Look at
summary(sapply(listw$weights, sum)) where listw is your listw object. I'll
add a warning to spautolm() to test whether the result is equal to a line
search bound.
In reply to your question, had your analysis not been flawed, you could
not judge between CAR and SAR in the way you suggest as the models are not
strictly nested. Please see Ripley (1981) Spatial Statistics, Wiley, p.
90, for a discussion of the relationship between SAR and CAR
representations. Briefly, if we term the CAR weights matrix C and the SAR
weights matrix S, then C = S + S' - S'S, and if LL' is the Cholesky
decomposition of (I - C), S = I - L'. If you do the full analysis of this
relationship, you may be able to proceed, but you also need to consider
the interpretation of any results.
Hope this helps,
Roger
> I would like to learn which model was better fit.
>
> However, the measures based on log likelihood and AIC imply different
> contradictions.
>
> 1. log likehood
>
> SAR is better than CAR (4919,629 > 3694.246)
>
> 2. AIC
>
> CAR is better than SAR (-7370.5 > -9821.3)
>
> Please kindly instruct which criterion I should follow, and advice on any
> other measure will be highly appreciated.
>
> Elaine
>
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>
> SAR
> Lambda: 0.999 LR test value: 13618 p-value: < 2.22e-16
> Log likelihood: 4919.629
> ML residual variance (sigma squared): 0.0075669, (sigma: 0.086988)
>
> Number of observations: 4873
>
> Number of parameters estimated: 9
>
> AIC: -9821.3
>
> Nagelkerke pseudo-R-squared: 1
>
>
>
> CAR
>
> Lambda: 0.999 LR test value: 11167 p-value: < 2.22e-16
>
>
>
> Log likelihood: 3694.246
>
> ML residual variance (sigma squared): 0.012682, (sigma: 0.11261)
>
> Number of observations: 4873
>
> Number of parameters estimated: 9
>
> AIC: -7370.5
>
> Nagelkerke pseudo-R-squared: 1
>
--
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