[R-sig-Geo] lm.morantest on glm residuals
Alexander.Herr at csiro.au
Alexander.Herr at csiro.au
Fri Jul 15 06:31:59 CEST 2005
Hi List,
I am looking at identifying spatial autocorrelation in glm.nb residuals.
Using Moran's test for residuals (lm.morantest) would require an lm
object. However, the glm.nb output does not provide this. My questions:
1) is it correct to use lm.morantest on negative binomial residuals
(nresid)
2) if so is it valid I force nresid into an lm object with
lm(nresid~-1)->nres1 to apply lm.morantest(nres1, listw.U)
3) if not, what are my alternatives?
Any help appreciated
Thanks
Herry
-----Original Message-----
From: r-sig-geo-bounces at stat.math.ethz.ch
[mailto:r-sig-geo-bounces at stat.math.ethz.ch] On Behalf Of
r-sig-geo-request at stat.math.ethz.ch
Sent: Wednesday, July 13, 2005 8:00 PM
To: r-sig-geo at stat.math.ethz.ch
Subject: R-sig-Geo Digest, Vol 23, Issue 8
Send R-sig-Geo mailing list submissions to
r-sig-geo at stat.math.ethz.ch
To subscribe or unsubscribe via the World Wide Web, visit
https://stat.ethz.ch/mailman/listinfo/r-sig-geo
or, via email, send a message with subject or body 'help' to
r-sig-geo-request at stat.math.ethz.ch
You can reach the person managing the list at
r-sig-geo-owner at stat.math.ethz.ch
When replying, please edit your Subject line so it is more specific
than "Re: Contents of R-sig-Geo digest..."
Today's Topics:
1. GIS Cafe News for July 11, 2005 (GISCafe Newsletter)
2. construct neighbour list (Yilin Liu)
----------------------------------------------------------------------
Message: 1
Date: Mon, 11 Jul 2005 22:55:16 -0700
From: "GISCafe Newsletter" <gis_news_letter at GISCafe.com>
Subject: [R-sig-Geo] GIS Cafe News for July 11, 2005
To: r-sig-geo at stat.math.ethz.ch
Message-ID: <200507120555.j6C5tGS0024173 at smtpcafe.ibsystems.com>
Content-Type: text/plain; charset="us-ascii"
An HTML attachment was scrubbed...
URL:
https://stat.ethz.ch/pipermail/r-sig-geo/attachments/20050711/1eebc5a0/a
ttachment-0001.html
------------------------------
Message: 2
Date: Tue, 12 Jul 2005 19:05:05 +0100
From: Yilin Liu <Y.liu at mdx.ac.uk>
Subject: [R-sig-Geo] construct neighbour list
To: r-sig-geo at stat.math.ethz.ch
Message-ID:
<A527689D36C527459F58091EA54212F35E5781 at MDX-CLX-DC1.uni.mdx.ac.uk>
Content-Type: text/plain; charset=UTF-8
Dear all,
Based on the neighbour list (denoted by X) obtained by "poly2nb", I
tried to modify it by the following codes:
X1<-X
for(i in 1:108){
for( j in 1:num[i]){
if(num[i]!=0){
k<-k+1
X1[[i]][j]<-adj[k]
}}}
where num[i] is the number of neighours of region i, adj[k] is the
region ID of the neighour.
A summary of X is:
Neighbour list object:
Number of regions: 108
Number of nonzero links: 536
Percentage nonzero weights: 4.595336
Average number of links: 4.962963
1 region with no links:
33
while a summary of X1 is:
Neighbour list object:
Number of regions: 108
Number of nonzero links: 0
Percentage nonzero weights: 0
Average number of links: 0
108 regions with no links:
This suggests no links have been set for X1.
However, X1[[match(i,r.id)]](where r.id<-attr(X1,"region.id"))
gives the right neighbours' ID for each region represented by "i".
How can solve this problem and get X1 with nonzero links.
Thanks.
------------------------------
_______________________________________________
R-sig-Geo mailing list
R-sig-Geo at stat.math.ethz.ch
https://stat.ethz.ch/mailman/listinfo/r-sig-geo
End of R-sig-Geo Digest, Vol 23, Issue 8
More information about the R-sig-Geo
mailing list