Loading ...
Sorry, an error occurred while loading the content.

AI-GEOSTATS: Moran's I

Expand Messages
  • kevin.weaver@mnr.gov.on.ca
    I have come across studies that have used local Moran s I and ones that have used global Moran s I but calculated using local windows. Each method can be used
    Message 1 of 12 , Jan 17, 2002
    • 0 Attachment
      I have come across studies that have used local Moran's I and ones that have
      used global Moran's I but calculated using local windows. Each method can
      be used to create a map of Moran's I values to explore the pattern of
      spatial autocorrelation on the surface.

      For exploratory purposes, is one better than the other?

      Thank you,

      Kevin


      --
      * To post a message to the list, send it to ai-geostats@...
      * As a general service to the users, please remember to post a summary of any useful responses to your questions.
      * To unsubscribe, send an email to majordomo@... with no subject and "unsubscribe ai-geostats" followed by "end" on the next line in the message body. DO NOT SEND Subscribe/Unsubscribe requests to the list
      * Support to the list is provided at http://www.ai-geostats.org
    • Nicholas Lewin-Koh
      Hi, The answer is It Depends . Each gives a slightly different view on the data. The local I, combined with the moran scatter plot will give you a feel for
      Message 2 of 12 , Jan 17, 2002
      • 0 Attachment
        Hi,
        The answer is "It Depends". Each gives a slightly different view on the
        data. The local I, combined with the moran scatter plot will give you a
        feel for whether or not a location is an outlier, or clustered with it's
        neighbors. Global I over local windows can give you a feel for whether or
        not the auto-correlation is constant (stationary) over the study
        region. Geographically weighted regression is also useful in this context
        (ala fotheringham, brunsdon, and charleton)

        My personal view is that in an exploratory context, one should use several
        indices and look at the features of the data, as well as all the basic
        stuff, scatter plots, histograms etc. The variogram cloud can also give
        some insight, though the variogram must be used with caution on lattice
        processes.

        I think someone also mentioned this already, but there are some nice
        packages in R for this type of analysis (spweights and sptests).

        Nicholas

        On Thu, 17 Jan 2002 kevin.weaver@... wrote:

        > I have come across studies that have used local Moran's I and ones that have
        > used global Moran's I but calculated using local windows. Each method can
        > be used to create a map of Moran's I values to explore the pattern of
        > spatial autocorrelation on the surface.
        >
        > For exploratory purposes, is one better than the other?
        >
        > Thank you,
        >
        > Kevin
        >
        >
        > --
        > * To post a message to the list, send it to ai-geostats@...
        > * As a general service to the users, please remember to post a summary of any useful responses to your questions.
        > * To unsubscribe, send an email to majordomo@... with no subject and "unsubscribe ai-geostats" followed by "end" on the next line in the message body. DO NOT SEND Subscribe/Unsubscribe requests to the list
        > * Support to the list is provided at http://www.ai-geostats.org
        >

        CH3
        |
        N Nicholas Lewin-Koh
        / \ Dept of Statistics
        N----C C==O Program in Ecology and Evolutionary Biology
        || || | Iowa State University
        || || | Ames, IA 50011
        CH C N--CH3 http://www.public.iastate.edu/~nlewin
        \ / \ / nlewin@...
        N C
        | || Currently
        CH3 O Graphics Lab
        School of Computing
        National University of Singapore
        The Real Part of Coffee kohnicho@...


        --
        * To post a message to the list, send it to ai-geostats@...
        * As a general service to the users, please remember to post a summary of any useful responses to your questions.
        * To unsubscribe, send an email to majordomo@... with no subject and "unsubscribe ai-geostats" followed by "end" on the next line in the message body. DO NOT SEND Subscribe/Unsubscribe requests to the list
        * Support to the list is provided at http://www.ai-geostats.org
      • Chaosheng Zhang
        Dear All, Can I ask you who have the experience of using different software packages in calculating Moran s I and recommend some (either commercial or free) to
        Message 3 of 12 , Jan 18, 2002
        • 0 Attachment
          Dear All,

          Can I ask you who have the experience of using different software packages
          in calculating Moran's I and recommend some (either commercial or free) to
          us?

          Until now, I haven't found a satisfactory one yet. My requirement is that
          the software package should calculate
          (1) Moran's I
          (2) Local Moran's I
          (3) Test for their significance level
          (4) Spatial Correlogram
          (5) Weighting function Wij which is suitable for polygon and point data

          Cheers,

          Chaosheng Zhang
          ===================================
          Dr. Chaosheng Zhang
          Lecturer in GIS
          Department of Geography
          National University of Ireland
          Galway
          IRELAND

          Tel: +353-91-524411 ext. 2375
          Fax: +353-91-525700
          Email: Chaosheng.Zhang@...
          ChaoshengZhang@...
          ===================================


          ----- Original Message -----
          From: <kevin.weaver@...>
          To: <ai-geostats@...>
          Sent: Thursday, January 17, 2002 8:32 PM
          Subject: AI-GEOSTATS: Moran's I


          > I have come across studies that have used local Moran's I and ones that
          have
          > used global Moran's I but calculated using local windows. Each method can
          > be used to create a map of Moran's I values to explore the pattern of
          > spatial autocorrelation on the surface.
          >
          > For exploratory purposes, is one better than the other?
          >
          > Thank you,
          >
          > Kevin
          >
          >
          > --
          > * To post a message to the list, send it to ai-geostats@...
          > * As a general service to the users, please remember to post a summary of
          any useful responses to your questions.
          > * To unsubscribe, send an email to majordomo@... with no subject and
          "unsubscribe ai-geostats" followed by "end" on the next line in the message
          body. DO NOT SEND Subscribe/Unsubscribe requests to the list
          > * Support to the list is provided at http://www.ai-geostats.org


          --
          * To post a message to the list, send it to ai-geostats@...
          * As a general service to the users, please remember to post a summary of any useful responses to your questions.
          * To unsubscribe, send an email to majordomo@... with no subject and "unsubscribe ai-geostats" followed by "end" on the next line in the message body. DO NOT SEND Subscribe/Unsubscribe requests to the list
          * Support to the list is provided at http://www.ai-geostats.org
        • Dick & Becky Block
          I believe that crimestat fits all your requirements. Dick ... From: Chaosheng Zhang To: Sent: Friday,
          Message 4 of 12 , Jan 18, 2002
          • 0 Attachment
            I believe that crimestat fits all your requirements.
            Dick
            ----- Original Message -----
            From: "Chaosheng Zhang" <Chaosheng.Zhang@...>
            To: <ai-geostats@...>
            Sent: Friday, January 18, 2002 4:08 AM
            Subject: Re: AI-GEOSTATS: Moran's I


            > Dear All,
            >
            > Can I ask you who have the experience of using different software packages
            > in calculating Moran's I and recommend some (either commercial or free) to
            > us?
            >
            > Until now, I haven't found a satisfactory one yet. My requirement is that
            > the software package should calculate
            > (1) Moran's I
            > (2) Local Moran's I
            > (3) Test for their significance level
            > (4) Spatial Correlogram
            > (5) Weighting function Wij which is suitable for polygon and point data
            >
            > Cheers,
            >
            > Chaosheng Zhang
            > ===================================
            > Dr. Chaosheng Zhang
            > Lecturer in GIS
            > Department of Geography
            > National University of Ireland
            > Galway
            > IRELAND
            >
            > Tel: +353-91-524411 ext. 2375
            > Fax: +353-91-525700
            > Email: Chaosheng.Zhang@...
            > ChaoshengZhang@...
            > ===================================
            >
            >
            > ----- Original Message -----
            > From: <kevin.weaver@...>
            > To: <ai-geostats@...>
            > Sent: Thursday, January 17, 2002 8:32 PM
            > Subject: AI-GEOSTATS: Moran's I
            >
            >
            > > I have come across studies that have used local Moran's I and ones that
            > have
            > > used global Moran's I but calculated using local windows. Each method
            can
            > > be used to create a map of Moran's I values to explore the pattern of
            > > spatial autocorrelation on the surface.
            > >
            > > For exploratory purposes, is one better than the other?
            > >
            > > Thank you,
            > >
            > > Kevin
            > >
            > >
            > > --
            > > * To post a message to the list, send it to ai-geostats@...
            > > * As a general service to the users, please remember to post a summary
            of
            > any useful responses to your questions.
            > > * To unsubscribe, send an email to majordomo@... with no subject and
            > "unsubscribe ai-geostats" followed by "end" on the next line in the
            message
            > body. DO NOT SEND Subscribe/Unsubscribe requests to the list
            > > * Support to the list is provided at http://www.ai-geostats.org
            >
            >
            > --
            > * To post a message to the list, send it to ai-geostats@...
            > * As a general service to the users, please remember to post a summary of
            any useful responses to your questions.
            > * To unsubscribe, send an email to majordomo@... with no subject and
            "unsubscribe ai-geostats" followed by "end" on the next line in the message
            body. DO NOT SEND Subscribe/Unsubscribe requests to the list
            > * Support to the list is provided at http://www.ai-geostats.org
            >
            >



            --
            * To post a message to the list, send it to ai-geostats@...
            * As a general service to the users, please remember to post a summary of any useful responses to your questions.
            * To unsubscribe, send an email to majordomo@... with no subject and "unsubscribe ai-geostats" followed by "end" on the next line in the message body. DO NOT SEND Subscribe/Unsubscribe requests to the list
            * Support to the list is provided at http://www.ai-geostats.org
          • Basil_LOH@ENV.gov.sg
            Try CrimeStat developed by Ned Levine. Goto http://www.ojp.usdoj.gov/cmrc/tools/welcome.html Click on Mapping Tools, and then download CrimeStat for free! By
            Message 5 of 12 , Jan 21, 2002
            • 0 Attachment
              Try CrimeStat developed by Ned Levine.
              Goto http://www.ojp.usdoj.gov/cmrc/tools/welcome.html
              Click on Mapping Tools, and then download CrimeStat for free!

              By the way, has anyone out there used Moran's I for diseases?

              Regards.
              Basil



              Chaosheng Zhang
              <Chaosheng.Zhang@nui To: ai-geostats@...
              galway.ie> cc:
              Sent by: Subject: Re: AI-GEOSTATS: Moran's I
              ai-geostats-list@uni
              l.ch


              18-01-2002 18:08
              Please respond to
              Chaosheng Zhang





              Dear All,

              Can I ask you who have the experience of using different software packages
              in calculating Moran's I and recommend some (either commercial or free) to
              us?

              Until now, I haven't found a satisfactory one yet. My requirement is that
              the software package should calculate
              (1) Moran's I
              (2) Local Moran's I
              (3) Test for their significance level
              (4) Spatial Correlogram
              (5) Weighting function Wij which is suitable for polygon and point data

              Cheers,

              Chaosheng Zhang
              ===================================
              Dr. Chaosheng Zhang
              Lecturer in GIS
              Department of Geography
              National University of Ireland
              Galway
              IRELAND

              Tel: +353-91-524411 ext. 2375
              Fax: +353-91-525700
              Email: Chaosheng.Zhang@...
              ChaoshengZhang@...
              ===================================


              ----- Original Message -----
              From: <kevin.weaver@...>
              To: <ai-geostats@...>
              Sent: Thursday, January 17, 2002 8:32 PM
              Subject: AI-GEOSTATS: Moran's I


              > I have come across studies that have used local Moran's I and ones that
              have
              > used global Moran's I but calculated using local windows. Each method
              can
              > be used to create a map of Moran's I values to explore the pattern of
              > spatial autocorrelation on the surface.
              >
              > For exploratory purposes, is one better than the other?
              >
              > Thank you,
              >
              > Kevin
              >
              >
              > --
              > * To post a message to the list, send it to ai-geostats@...
              > * As a general service to the users, please remember to post a summary of
              any useful responses to your questions.
              > * To unsubscribe, send an email to majordomo@... with no subject and
              "unsubscribe ai-geostats" followed by "end" on the next line in the message
              body. DO NOT SEND Subscribe/Unsubscribe requests to the list
              > * Support to the list is provided at http://www.ai-geostats.org


              --
              * To post a message to the list, send it to ai-geostats@...
              * As a general service to the users, please remember to post a summary of
              any useful responses to your questions.
              * To unsubscribe, send an email to majordomo@... with no subject and
              "unsubscribe ai-geostats" followed by "end" on the next line in the message
              body. DO NOT SEND Subscribe/Unsubscribe requests to the list
              * Support to the list is provided at http://www.ai-geostats.org





              --
              * To post a message to the list, send it to ai-geostats@...
              * As a general service to the users, please remember to post a summary of any useful responses to your questions.
              * To unsubscribe, send an email to majordomo@... with no subject and "unsubscribe ai-geostats" followed by "end" on the next line in the message body. DO NOT SEND Subscribe/Unsubscribe requests to the list
              * Support to the list is provided at http://www.ai-geostats.org
            • Irene Schmidtmann
              ... Yes. Among others, Iris Zöllner and I have applied them to German Cancer data (mortality data and incidence data from the German Childhood Cancer
              Message 6 of 12 , Jan 21, 2002
              • 0 Attachment
                > From: Basil_LOH@...
                > Subject: Re: AI-GEOSTATS: Moran's I
                > To: Chaosheng Zhang <Chaosheng.Zhang@...>
                > Cc: ai-geostats@..., ai-geostats-list@...
                > Date: Mon, 21 Jan 2002 18:22:50 +0800
                > Reply-to: Basil_LOH@...

                >
                > Try CrimeStat developed by Ned Levine.
                > Goto http://www.ojp.usdoj.gov/cmrc/tools/welcome.html
                > Click on Mapping Tools, and then download CrimeStat for free!
                >
                > By the way, has anyone out there used Moran's I for diseases?
                >
                Yes. Among others, Iris Zöllner and I have applied them to German Cancer data
                (mortality data and incidence data from the German Childhood Cancer registry).
                See e. g.

                "Empirical Studies of Cluster Detection - Different Cluster Tests in
                Application to German Cancer Maps" in Disease Mapping and Risk Assessment for
                Public Health, eds. A. B. Lawson et al, 1999 John Wiley

                It seems that the distribution of Moran's I can be approximated reasonably well
                by a randomization approach even if the population figures differ in the
                regions. Oden (Adjusting Moran's I for population density, Statistics in
                Medicine 14, 17-26, 1996) has taken into account unequal population and
                modified the Moran statistic accordingly. (There has been debate whether
                Oden's normal approximation is correct, a limiting chi-square distribution may
                be more appropriate.)

                Yours sincerely
                Irene Schmidtmann

                Krebsregister Rheinland-Pfalz, Registerstelle
                Institut für Medizinische Biometrie, Epidemiologie und Informatik (IMBEI)
                (was Institut für Medizinische Statistik und Dokumentation)
                Klinikum der Johannes Gutenberg-Universität
                55101 Mainz
                Germany
                Tel. +49-6131-176710
                Fax +49-6131-172968
                E-mail schmidtm@...-mainz.de
                http://info.imsd.Uni-Mainz.DE/Krebsregister/

                --
                * To post a message to the list, send it to ai-geostats@...
                * As a general service to the users, please remember to post a summary of any useful responses to your questions.
                * To unsubscribe, send an email to majordomo@... with no subject and "unsubscribe ai-geostats" followed by "end" on the next line in the message body. DO NOT SEND Subscribe/Unsubscribe requests to the list
                * Support to the list is provided at http://www.ai-geostats.org
              • Nicholas Lewin-Koh
                On Mon, 21 Jan 2002, Irene Schmidtmann wrote: Hi, Actually the exact distribution of Moran s I has been derived by M. Teifesdorf, look at Environment and
                Message 7 of 12 , Jan 23, 2002
                • 0 Attachment
                  On Mon, 21 Jan 2002, Irene Schmidtmann wrote:
                  Hi,
                  Actually the exact distribution of Moran's I has been derived by
                  M. Teifesdorf, look at Environment and planning A 27:pp 285-999. It has
                  long been known that the normal approximation has strong assumptions
                  associated with it that often do not hold, becuase conditonal on the
                  weight matrix the distribution can be highly skewed.

                  Nicholas

                  >
                  > "Empirical Studies of Cluster Detection - Different Cluster Tests in
                  > Application to German Cancer Maps" in Disease Mapping and Risk Assessment for
                  > Public Health, eds. A. B. Lawson et al, 1999 John Wiley
                  >
                  > It seems that the distribution of Moran's I can be approximated reasonably well
                  > by a randomization approach even if the population figures differ in the
                  > regions. Oden (Adjusting Moran's I for population density, Statistics in
                  > Medicine 14, 17-26, 1996) has taken into account unequal population and
                  > modified the Moran statistic accordingly. (There has been debate whether
                  > Oden's normal approximation is correct, a limiting chi-square distribution may
                  > be more appropriate.)
                  >
                  > Yours sincerely
                  > Irene Schmidtmann
                  >

                  CH3
                  |
                  N Nicholas Lewin-Koh
                  / \ Dept of Statistics
                  N----C C==O Program in Ecology and Evolutionary Biology
                  || || | Iowa State University
                  || || | Ames, IA 50011
                  CH C N--CH3 http://www.public.iastate.edu/~nlewin
                  \ / \ / nlewin@...
                  N C
                  | || Currently
                  CH3 O Graphics Lab
                  School of Computing
                  National University of Singapore
                  The Real Part of Coffee kohnicho@...


                  --
                  * To post a message to the list, send it to ai-geostats@...
                  * As a general service to the users, please remember to post a summary of any useful responses to your questions.
                  * To unsubscribe, send an email to majordomo@... with no subject and "unsubscribe ai-geostats" followed by "end" on the next line in the message body. DO NOT SEND Subscribe/Unsubscribe requests to the list
                  * Support to the list is provided at http://www.ai-geostats.org
                • Poos, J.J.
                  Dear list members, I have I question regarding Moran s I. Is this the same statistical parameter referred to as a correlogram in GSLIBS? Jan Jaap -- * To
                  Message 8 of 12 , Jan 25, 2002
                  • 0 Attachment
                    Dear list members,

                    I have I question regarding Moran's I. Is this the same statistical
                    parameter referred to as a "correlogram" in GSLIBS?

                    Jan Jaap

                    --
                    * To post a message to the list, send it to ai-geostats@...
                    * As a general service to the users, please remember to post a summary of any useful responses to your questions.
                    * To unsubscribe, send an email to majordomo@... with no subject and "unsubscribe ai-geostats" followed by "end" on the next line in the message body. DO NOT SEND Subscribe/Unsubscribe requests to the list
                    * Support to the list is provided at http://www.ai-geostats.org
                  • Koen Hufkens
                    Hi list, I have some coding and theoretical questions regarding the Moran s I index and the R + spdep packages. - To illustrate the situation of the sampling
                    Message 9 of 12 , Mar 14, 2004
                    • 0 Attachment
                      Hi list,

                      I have some coding and theoretical questions regarding the Moran's I index
                      and the R + spdep packages.

                      - To illustrate the situation of the sampling plot:

                      http://users.pandora.be/requested/thesis/a1grid.gif
                      (coordinates in lat lon projection, point size representative for sample
                      value)

                      - The data distribution:

                      http://users.pandora.be/requested/thesis/hista1.gif
                      (haven't tested for normality yet)


                      => My method to get my Moran's I index in R + spdep:

                      a1.knn <- knearneigh(a1$coords, k=4, lonlat=TRUE)
                      #with a1$coords the latlon coords out of a geoR geodata file

                      a1.nb <- knn2nb(a1.knn)
                      # conversion to nb object

                      a1.listw <- nb2listw(a1.nb)
                      # conversion to listw object, requested for moran.test()

                      results <- moran.test(a1$data, a1.listw, randomization=FALSE,
                      alternative="two.sided")

                      The results show the following statistics:

                      > moran.test(a1$data, a1.listw, randomisation=FALSE,
                      > alternative="two.sided")

                      Moran's I test under normality

                      data: a1$data
                      weights: a1.listw

                      Moran I statistic standard deviate = 0.2911, p-value = 0.771
                      alternative hypothesis: two.sided
                      sample estimates:
                      Moran I statistic Expectation Variance
                      -0.03762590 -0.08333333 0.02464896

                      With a Moran's I of -0.04 and a p-value of 0.771 I would say this isn't
                      much of a statistic or not exactly what I expected.

                      I would think that since I evaluate ecological/biophysical paramters it
                      wouldn't be possible to get negative correlations since in vegetations
                      there is always some kind of autocorrelation involved. It could be just a
                      little but certainly not negative.

                      Strange thing is that I get the same weights in my weights class of my
                      a1.listw file

                      > a1.listw$weights
                      [[1]]
                      [1] 0.25 0.25 0.25 0.25

                      [[2]]
                      [1] 0.25 0.25 0.25 0.25

                      [[3]]
                      [1] 0.25 0.25 0.25 0.25
                      ...

                      I think it has something to do with the k-value in knearneigh(), but even
                      if I change it to 8 (changing from bishops/rooks to queens case?) they
                      stay the same. Any idea why this is the case?

                      So maybe the strange statistics could be a problem of a faulty weights
                      matrix. So if you have any comments on the code/method used it would be
                      appreciated.

                      Best regards,
                      Koen.

                      --
                      * To post a message to the list, send it to ai-geostats@...
                      * As a general service to the users, please remember to post a summary of any useful responses to your questions.
                      * To unsubscribe, send an email to majordomo@... with no subject and "unsubscribe ai-geostats" followed by "end" on the next line in the message body. DO NOT SEND Subscribe/Unsubscribe requests to the list
                      * Support to the list is provided at http://www.ai-geostats.org
                    • Roger Bivand
                      ... First, thanks for including links to your figures, makes helping easier. ... Note that you have called nb2listw() with the default style, which is
                      Message 10 of 12 , Mar 14, 2004
                      • 0 Attachment
                        On Sun, 14 Mar 2004, Koen Hufkens wrote:

                        > Hi list,
                        >
                        > I have some coding and theoretical questions regarding the Moran's I index
                        > and the R + spdep packages.
                        >
                        > - To illustrate the situation of the sampling plot:
                        >
                        > http://users.pandora.be/requested/thesis/a1grid.gif
                        > (coordinates in lat lon projection, point size representative for sample
                        > value)
                        >
                        > - The data distribution:
                        >
                        > http://users.pandora.be/requested/thesis/hista1.gif
                        > (haven't tested for normality yet)

                        First, thanks for including links to your figures, makes helping easier.
                        >
                        >
                        > => My method to get my Moran's I index in R + spdep:
                        >
                        > a1.knn <- knearneigh(a1$coords, k=4, lonlat=TRUE)
                        > #with a1$coords the latlon coords out of a geoR geodata file
                        >
                        > a1.nb <- knn2nb(a1.knn)
                        > # conversion to nb object
                        >
                        > a1.listw <- nb2listw(a1.nb)
                        > # conversion to listw object, requested for moran.test()

                        Note that you have called nb2listw() with the default style, which is
                        row-standardised ("W") - so with 4 neighbours for each object, all thw
                        weights will be 1/4. With style="B", the weights would all be 1. This
                        isn't a full analogy of a rook pattern, because those around the edges
                        will already be queen style or more. Look at plot(a1.nb, a1$coords) to see
                        this.

                        >
                        > results <- moran.test(a1$data, a1.listw, randomization=FALSE,
                        > alternative="two.sided")
                        >
                        > The results show the following statistics:
                        >
                        > > moran.test(a1$data, a1.listw, randomisation=FALSE,
                        > > alternative="two.sided")
                        >
                        > Moran's I test under normality
                        >
                        > data: a1$data
                        > weights: a1.listw
                        >
                        > Moran I statistic standard deviate = 0.2911, p-value = 0.771
                        > alternative hypothesis: two.sided
                        > sample estimates:
                        > Moran I statistic Expectation Variance
                        > -0.03762590 -0.08333333 0.02464896
                        >
                        > With a Moran's I of -0.04 and a p-value of 0.771 I would say this isn't
                        > much of a statistic or not exactly what I expected.
                        >
                        Well, looking at your figure (just eyeballing), there are quite a lot of
                        big/small neighbours as well as small/small and big/big. Did you try
                        looking at a Moran scatterplot to get a feel for what is going on?
                        moran.plot() is the function to try. I think you'll see that all four
                        quadrants of the plot have observations, leading to a very flat and
                        non-significant relationships. Maybe this is because the k-nearest
                        neighbours weights are not reflecting what you want - could you try using
                        dnearneigh() for the appropriate number of km instead, or use edit.nb() to
                        cut out the possibly disturbing long links?

                        > I would think that since I evaluate ecological/biophysical paramters it
                        > wouldn't be possible to get negative correlations since in vegetations
                        > there is always some kind of autocorrelation involved. It could be just a
                        > little but certainly not negative.

                        Note that it is still greater than its expectation (which shows that you
                        only have the 13 observations shown on the figure), but with the variance
                        you have is not significantly different from its expectation. Why did you
                        use normality rather than randomisation (or Monte Carlo)? With so few
                        observations, this may be an issue.

                        >
                        > Strange thing is that I get the same weights in my weights class of my
                        > a1.listw file
                        >
                        Explained above - this was what you asked for. For distance weighted see
                        nbdists(), though your points are regularly spaced.

                        > > a1.listw$weights
                        > [[1]]
                        > [1] 0.25 0.25 0.25 0.25
                        >
                        > [[2]]
                        > [1] 0.25 0.25 0.25 0.25
                        >
                        > [[3]]
                        > [1] 0.25 0.25 0.25 0.25
                        > ...
                        >
                        > I think it has something to do with the k-value in knearneigh(), but even
                        > if I change it to 8 (changing from bishops/rooks to queens case?) they
                        > stay the same. Any idea why this is the case?
                        >
                        > So maybe the strange statistics could be a problem of a faulty weights
                        > matrix. So if you have any comments on the code/method used it would be
                        > appreciated.
                        >
                        > Best regards,
                        > Koen.
                        >
                        > --
                        > * To post a message to the list, send it to ai-geostats@...
                        > * As a general service to the users, please remember to post a summary of any useful responses to your questions.
                        > * To unsubscribe, send an email to majordomo@... with no subject and "unsubscribe ai-geostats" followed by "end" on the next line in the message body. DO NOT SEND Subscribe/Unsubscribe requests to the list
                        > * Support to the list is provided at http://www.ai-geostats.org
                        >

                        --
                        Roger Bivand
                        Economic Geography Section, Department of Economics, Norwegian School of
                        Economics and Business Administration, Breiviksveien 40, N-5045 Bergen,
                        Norway. voice: +47 55 95 93 55; fax +47 55 95 93 93
                        e-mail: Roger.Bivand@...



                        --
                        * To post a message to the list, send it to ai-geostats@...
                        * As a general service to the users, please remember to post a summary of any useful responses to your questions.
                        * To unsubscribe, send an email to majordomo@... with no subject and "unsubscribe ai-geostats" followed by "end" on the next line in the message body. DO NOT SEND Subscribe/Unsubscribe requests to the list
                        * Support to the list is provided at http://www.ai-geostats.org
                      • Koen Hufkens
                        Hi all, Followup on my questions concerning R + spdep: I used dnearneigh() instead of knearneigh() to get the point point relationships I wanted. The old
                        Message 11 of 12 , Mar 16, 2004
                        • 0 Attachment
                          Hi all,

                          Followup on my questions concerning R + spdep:

                          I used dnearneigh() instead of knearneigh() to get the point point
                          relationships I wanted.

                          The old version looked like this:

                          http://users.pandora.be/requested/thesis/oldconnections.png

                          notice the sparse connection pattern between the points, certainly in the
                          centre.

                          I used dnearneight() to change this into this:

                          http://users.pandora.be/requested/thesis/connections.png

                          so the center points get more connections/interactions.

                          all ok, for the weights... but as before the weights are relative to the
                          connection and not to the distance and the connection. A consequence from
                          a binary spatial connectivity matrix I presume. nbdists() gives me a matix
                          of all the distances in the neighbourhood directions but I can't use them
                          to be a relative measure to convert the old weights into distance weighted
                          ones.

                          Question is, what's the influence of this on the final result?

                          Old results:

                          Moran's I test under normality

                          Moran I statistic standard deviate = 0.2911, p-value = 0.771
                          alternative hypothesis: two.sided
                          sample estimates:
                          Moran I statistic Expectation Variance
                          -0.03762590 -0.08333333 0.02464896

                          New results with the same data and a new weights matrix:

                          data: a1$data
                          weights: a1.listw

                          Moran's I test under normality

                          Moran I statistic standard deviate = 0.3303, p-value = 0.7412
                          alternative hypothesis: two.sided
                          sample estimates:
                          Moran I statistic Expectation Variance
                          -0.03703572 -0.08333333 0.01964896

                          Moran's I test under randomisation

                          Moran I statistic standard deviate = 0.3305, p-value = 0.741
                          alternative hypothesis: two.sided
                          sample estimates:
                          Moran I statistic Expectation Variance
                          -0.03703572 -0.08333333 0.01962520

                          Monte-Carlo simulation of Moran's I

                          number of simulations + 1: 1000

                          statistic = -0.037, observed rank = 673, p-value = 0.327
                          alternative hypothesis: greater

                          You can see that the p-value drops over normal, random to the MC
                          simulation.
                          But I don't come to a significant difference between the statistic and the
                          expected value. I think I can conclude that in this case there is a slight
                          to zero spatial autocorrelation between samples and this could as well
                          been a set of data sampled at random in this particular plot.

                          Just for the record: I don't see the difference between what is done in
                          the test under randomisation and the test using MC simulation.

                          As I may quote:

                          "With a Monte Carlo test the significance of an observed test statistic is
                          assessed by comparing it with as a sample of test statistics obtained by
                          generating random samples using some assumed model. If the assumed model
                          implies that all data orderings are equally likely then this amounts to a
                          randomisation test with random sampling of the randomisation distribution"
                          - "Brian F. J. Manly - Randomization, bootstrap and monte carlo methods in
                          biology"

                          But this last one is something for the people who wrote the code I think.

                          Any comments, would be appreciated... It's uncharted territory for me so..

                          Best regards,

                          Koen.

                          ------- Forwarded message -------
                          From: Roger Bivand <Roger.Bivand@...>
                          To: Koen Hufkens <koen.hufkens@...>
                          Subject: Re: AI-GEOSTATS: Moran's I
                          Date: Sun, 14 Mar 2004 17:43:53 +0100 (CET)

                          > On Sun, 14 Mar 2004, Koen Hufkens wrote:
                          >
                          >> Hi list,
                          >>
                          >> I have some coding and theoretical questions regarding the Moran's I
                          >> index
                          >> and the R + spdep packages.
                          >>
                          >> - To illustrate the situation of the sampling plot:
                          >>
                          >> http://users.pandora.be/requested/thesis/a1grid.gif
                          >> (coordinates in lat lon projection, point size representative for sample
                          >> value)
                          >>
                          >> - The data distribution:
                          >>
                          >> http://users.pandora.be/requested/thesis/hista1.gif
                          >> (haven't tested for normality yet)
                          >
                          > First, thanks for including links to your figures, makes helping easier.
                          >>
                          >>
                          >> => My method to get my Moran's I index in R + spdep:
                          >>
                          >> a1.knn <- knearneigh(a1$coords, k=4, lonlat=TRUE)
                          >> #with a1$coords the latlon coords out of a geoR geodata file
                          >>
                          >> a1.nb <- knn2nb(a1.knn)
                          >> # conversion to nb object
                          >>
                          >> a1.listw <- nb2listw(a1.nb)
                          >> # conversion to listw object, requested for moran.test()
                          >
                          > Note that you have called nb2listw() with the default style, which is
                          > row-standardised ("W") - so with 4 neighbours for each object, all thw
                          > weights will be 1/4. With style="B", the weights would all be 1. This
                          > isn't a full analogy of a rook pattern, because those around the edges
                          > will already be queen style or more. Look at plot(a1.nb, a1$coords) to
                          > see
                          > this.
                          >
                          >>
                          >> results <- moran.test(a1$data, a1.listw, randomization=FALSE,
                          >> alternative="two.sided")
                          >>
                          >> The results show the following statistics:
                          >>
                          >> > moran.test(a1$data, a1.listw, randomisation=FALSE,
                          >> > alternative="two.sided")
                          >>
                          >> Moran's I test under normality
                          >>
                          >> data: a1$data
                          >> weights: a1.listw
                          >>
                          >> Moran I statistic standard deviate = 0.2911, p-value = 0.771
                          >> alternative hypothesis: two.sided
                          >> sample estimates:
                          >> Moran I statistic Expectation Variance
                          >> -0.03762590 -0.08333333 0.02464896
                          >>
                          >> With a Moran's I of -0.04 and a p-value of 0.771 I would say this isn't
                          >> much of a statistic or not exactly what I expected.
                          >>
                          > Well, looking at your figure (just eyeballing), there are quite a lot of
                          > big/small neighbours as well as small/small and big/big. Did you try
                          > looking at a Moran scatterplot to get a feel for what is going on?
                          > moran.plot() is the function to try. I think you'll see that all four
                          > quadrants of the plot have observations, leading to a very flat and
                          > non-significant relationships. Maybe this is because the k-nearest
                          > neighbours weights are not reflecting what you want - could you try using
                          > dnearneigh() for the appropriate number of km instead, or use edit.nb()
                          > to
                          > cut out the possibly disturbing long links?
                          >
                          >> I would think that since I evaluate ecological/biophysical paramters it
                          >> wouldn't be possible to get negative correlations since in vegetations
                          >> there is always some kind of autocorrelation involved. It could be just
                          >> a
                          >> little but certainly not negative.
                          >
                          > Note that it is still greater than its expectation (which shows that you
                          > only have the 13 observations shown on the figure), but with the variance
                          > you have is not significantly different from its expectation. Why did you
                          > use normality rather than randomisation (or Monte Carlo)? With so few
                          > observations, this may be an issue.
                          >
                          >>
                          >> Strange thing is that I get the same weights in my weights class of my
                          >> a1.listw file
                          >>
                          > Explained above - this was what you asked for. For distance weighted see
                          > nbdists(), though your points are regularly spaced.
                          >
                          >> > a1.listw$weights
                          >> [[1]]
                          >> [1] 0.25 0.25 0.25 0.25
                          >>
                          >> [[2]]
                          >> [1] 0.25 0.25 0.25 0.25
                          >>
                          >> [[3]]
                          >> [1] 0.25 0.25 0.25 0.25
                          >> ...
                          >>
                          >> I think it has something to do with the k-value in knearneigh(), but
                          >> even
                          >> if I change it to 8 (changing from bishops/rooks to queens case?) they
                          >> stay the same. Any idea why this is the case?
                          >>
                          >> So maybe the strange statistics could be a problem of a faulty weights
                          >> matrix. So if you have any comments on the code/method used it would be
                          >> appreciated.
                          >>
                          >> Best regards,
                          >> Koen.
                          >>
                          >> --
                          >> * To post a message to the list, send it to ai-geostats@...
                          >> * As a general service to the users, please remember to post a summary
                          >> of any useful responses to your questions.
                          >> * To unsubscribe, send an email to majordomo@... with no subject
                          >> and "unsubscribe ai-geostats" followed by "end" on the next line in the
                          >> message body. DO NOT SEND Subscribe/Unsubscribe requests to the list
                          >> * Support to the list is provided at http://www.ai-geostats.org
                          >>
                          >



                          --
                          Using M2, Opera's revolutionary e-mail client: http://www.opera.com/m2/

                          --
                          * To post a message to the list, send it to ai-geostats@...
                          * As a general service to the users, please remember to post a summary of any useful responses to your questions.
                          * To unsubscribe, send an email to majordomo@... with no subject and "unsubscribe ai-geostats" followed by "end" on the next line in the message body. DO NOT SEND Subscribe/Unsubscribe requests to the list
                          * Support to the list is provided at http://www.ai-geostats.org
                        • Roger Bivand
                          ... Towards the bottom of the examples on the help page for nb2listw(), you see: dlist
                          Message 12 of 12 , Mar 16, 2004
                          • 0 Attachment
                            On Tue, 16 Mar 2004, Koen Hufkens wrote:

                            > Hi all,
                            >
                            > Followup on my questions concerning R + spdep:
                            >
                            > I used dnearneigh() instead of knearneigh() to get the point point
                            > relationships I wanted.
                            >
                            > The old version looked like this:
                            >
                            > http://users.pandora.be/requested/thesis/oldconnections.png
                            >
                            > notice the sparse connection pattern between the points, certainly in the
                            > centre.
                            >
                            > I used dnearneight() to change this into this:
                            >
                            > http://users.pandora.be/requested/thesis/connections.png
                            >
                            > so the center points get more connections/interactions.
                            >
                            > all ok, for the weights... but as before the weights are relative to the
                            > connection and not to the distance and the connection. A consequence from
                            > a binary spatial connectivity matrix I presume. nbdists() gives me a matix
                            > of all the distances in the neighbourhood directions but I can't use them
                            > to be a relative measure to convert the old weights into distance weighted
                            > ones.

                            Towards the bottom of the examples on the help page for nb2listw(), you
                            see:

                            dlist <- nbdists(col.gal.nb, coords)
                            dlist <- lapply(dlist, function(x) 1/x)
                            col.w.d <- nb2listw(col.gal.nb, glist=dlist)
                            summary(unlist(col.w$weights))
                            summary(unlist(col.w.d$weights))

                            as an example for imposing inverse distance weights on a weights object.
                            In your case, many distances will be equal, I think.

                            >
                            > Question is, what's the influence of this on the final result?
                            >
                            > Old results:
                            >
                            > Moran's I test under normality
                            >
                            > Moran I statistic standard deviate = 0.2911, p-value = 0.771
                            > alternative hypothesis: two.sided
                            > sample estimates:
                            > Moran I statistic Expectation Variance
                            > -0.03762590 -0.08333333 0.02464896
                            >
                            > New results with the same data and a new weights matrix:
                            >
                            > data: a1$data
                            > weights: a1.listw
                            >
                            > Moran's I test under normality
                            >
                            > Moran I statistic standard deviate = 0.3303, p-value = 0.7412
                            > alternative hypothesis: two.sided
                            > sample estimates:
                            > Moran I statistic Expectation Variance
                            > -0.03703572 -0.08333333 0.01964896
                            >
                            > Moran's I test under randomisation
                            >
                            > Moran I statistic standard deviate = 0.3305, p-value = 0.741
                            > alternative hypothesis: two.sided
                            > sample estimates:
                            > Moran I statistic Expectation Variance
                            > -0.03703572 -0.08333333 0.01962520
                            >

                            So it appears that, according to Moran's I, there is no (significant)
                            spatial autocorrelation detected in your data. Have you looked at
                            moran.plot() too? With few points it will be difficult to detect much, I
                            think.


                            > Monte-Carlo simulation of Moran's I
                            >
                            > number of simulations + 1: 1000
                            >
                            > statistic = -0.037, observed rank = 673, p-value = 0.327
                            > alternative hypothesis: greater
                            >
                            > You can see that the p-value drops over normal, random to the MC
                            > simulation.
                            > But I don't come to a significant difference between the statistic and the
                            > expected value. I think I can conclude that in this case there is a slight
                            > to zero spatial autocorrelation between samples and this could as well
                            > been a set of data sampled at random in this particular plot.
                            >
                            > Just for the record: I don't see the difference between what is done in
                            > the test under randomisation and the test using MC simulation.
                            >

                            Under randomisation, only the analytical formulae are used, the MC
                            simulation actually permutes the data on the tesselation.

                            > As I may quote:
                            >
                            > "With a Monte Carlo test the significance of an observed test statistic is
                            > assessed by comparing it with as a sample of test statistics obtained by
                            > generating random samples using some assumed model. If the assumed model
                            > implies that all data orderings are equally likely then this amounts to a
                            > randomisation test with random sampling of the randomisation distribution"
                            > - "Brian F. J. Manly - Randomization, bootstrap and monte carlo methods in
                            > biology"
                            >
                            > But this last one is something for the people who wrote the code I think.
                            >
                            The person (me) writing the code was (is) reproducing the literature given
                            in references, so that those needing one or other can try out possibly
                            appropriate functions. Yes, they should be the same or similar, and
                            usually are, also here, where the number of observations is small and
                            their relative values seem not to exhibit spatial dependence.

                            > Any comments, would be appreciated... It's uncharted territory for me so..
                            >
                            > Best regards,
                            >
                            > Koen.
                            >
                            > ------- Forwarded message -------
                            > From: Roger Bivand <Roger.Bivand@...>
                            > To: Koen Hufkens <koen.hufkens@...>
                            > Subject: Re: AI-GEOSTATS: Moran's I
                            > Date: Sun, 14 Mar 2004 17:43:53 +0100 (CET)
                            >
                            > > On Sun, 14 Mar 2004, Koen Hufkens wrote:
                            > >
                            > >> Hi list,
                            > >>
                            > >> I have some coding and theoretical questions regarding the Moran's I
                            > >> index
                            > >> and the R + spdep packages.
                            > >>
                            > >> - To illustrate the situation of the sampling plot:
                            > >>
                            > >> http://users.pandora.be/requested/thesis/a1grid.gif
                            > >> (coordinates in lat lon projection, point size representative for sample
                            > >> value)
                            > >>
                            > >> - The data distribution:
                            > >>
                            > >> http://users.pandora.be/requested/thesis/hista1.gif
                            > >> (haven't tested for normality yet)
                            > >
                            > > First, thanks for including links to your figures, makes helping easier.
                            > >>
                            > >>
                            > >> => My method to get my Moran's I index in R + spdep:
                            > >>
                            > >> a1.knn <- knearneigh(a1$coords, k=4, lonlat=TRUE)
                            > >> #with a1$coords the latlon coords out of a geoR geodata file
                            > >>
                            > >> a1.nb <- knn2nb(a1.knn)
                            > >> # conversion to nb object
                            > >>
                            > >> a1.listw <- nb2listw(a1.nb)
                            > >> # conversion to listw object, requested for moran.test()
                            > >
                            > > Note that you have called nb2listw() with the default style, which is
                            > > row-standardised ("W") - so with 4 neighbours for each object, all thw
                            > > weights will be 1/4. With style="B", the weights would all be 1. This
                            > > isn't a full analogy of a rook pattern, because those around the edges
                            > > will already be queen style or more. Look at plot(a1.nb, a1$coords) to
                            > > see
                            > > this.
                            > >
                            > >>
                            > >> results <- moran.test(a1$data, a1.listw, randomization=FALSE,
                            > >> alternative="two.sided")
                            > >>
                            > >> The results show the following statistics:
                            > >>
                            > >> > moran.test(a1$data, a1.listw, randomisation=FALSE,
                            > >> > alternative="two.sided")
                            > >>
                            > >> Moran's I test under normality
                            > >>
                            > >> data: a1$data
                            > >> weights: a1.listw
                            > >>
                            > >> Moran I statistic standard deviate = 0.2911, p-value = 0.771
                            > >> alternative hypothesis: two.sided
                            > >> sample estimates:
                            > >> Moran I statistic Expectation Variance
                            > >> -0.03762590 -0.08333333 0.02464896
                            > >>
                            > >> With a Moran's I of -0.04 and a p-value of 0.771 I would say this isn't
                            > >> much of a statistic or not exactly what I expected.
                            > >>
                            > > Well, looking at your figure (just eyeballing), there are quite a lot of
                            > > big/small neighbours as well as small/small and big/big. Did you try
                            > > looking at a Moran scatterplot to get a feel for what is going on?
                            > > moran.plot() is the function to try. I think you'll see that all four
                            > > quadrants of the plot have observations, leading to a very flat and
                            > > non-significant relationships. Maybe this is because the k-nearest
                            > > neighbours weights are not reflecting what you want - could you try using
                            > > dnearneigh() for the appropriate number of km instead, or use edit.nb()
                            > > to
                            > > cut out the possibly disturbing long links?
                            > >
                            > >> I would think that since I evaluate ecological/biophysical paramters it
                            > >> wouldn't be possible to get negative correlations since in vegetations
                            > >> there is always some kind of autocorrelation involved. It could be just
                            > >> a
                            > >> little but certainly not negative.
                            > >
                            > > Note that it is still greater than its expectation (which shows that you
                            > > only have the 13 observations shown on the figure), but with the variance
                            > > you have is not significantly different from its expectation. Why did you
                            > > use normality rather than randomisation (or Monte Carlo)? With so few
                            > > observations, this may be an issue.
                            > >
                            > >>
                            > >> Strange thing is that I get the same weights in my weights class of my
                            > >> a1.listw file
                            > >>
                            > > Explained above - this was what you asked for. For distance weighted see
                            > > nbdists(), though your points are regularly spaced.
                            > >
                            > >> > a1.listw$weights
                            > >> [[1]]
                            > >> [1] 0.25 0.25 0.25 0.25
                            > >>
                            > >> [[2]]
                            > >> [1] 0.25 0.25 0.25 0.25
                            > >>
                            > >> [[3]]
                            > >> [1] 0.25 0.25 0.25 0.25
                            > >> ...
                            > >>
                            > >> I think it has something to do with the k-value in knearneigh(), but
                            > >> even
                            > >> if I change it to 8 (changing from bishops/rooks to queens case?) they
                            > >> stay the same. Any idea why this is the case?
                            > >>
                            > >> So maybe the strange statistics could be a problem of a faulty weights
                            > >> matrix. So if you have any comments on the code/method used it would be
                            > >> appreciated.
                            > >>
                            > >> Best regards,
                            > >> Koen.
                            > >>
                            > >> --
                            > >> * To post a message to the list, send it to ai-geostats@...
                            > >> * As a general service to the users, please remember to post a summary
                            > >> of any useful responses to your questions.
                            > >> * To unsubscribe, send an email to majordomo@... with no subject
                            > >> and "unsubscribe ai-geostats" followed by "end" on the next line in the
                            > >> message body. DO NOT SEND Subscribe/Unsubscribe requests to the list
                            > >> * Support to the list is provided at http://www.ai-geostats.org
                            > >>
                            > >
                            >
                            >
                            >
                            >

                            --
                            Roger Bivand
                            Economic Geography Section, Department of Economics, Norwegian School of
                            Economics and Business Administration, Breiviksveien 40, N-5045 Bergen,
                            Norway. voice: +47 55 95 93 55; fax +47 55 95 93 93
                            e-mail: Roger.Bivand@...



                            --
                            * To post a message to the list, send it to ai-geostats@...
                            * As a general service to the users, please remember to post a summary of any useful responses to your questions.
                            * To unsubscribe, send an email to majordomo@... with no subject and "unsubscribe ai-geostats" followed by "end" on the next line in the message body. DO NOT SEND Subscribe/Unsubscribe requests to the list
                            * Support to the list is provided at http://www.ai-geostats.org
                          Your message has been successfully submitted and would be delivered to recipients shortly.