[R-sig-Geo] 'help'

Roger Bivand Roger.Bivand at nhh.no
Sat Apr 14 18:55:32 CEST 2018


On Sat, 14 Apr 2018, Sarah Goslee wrote:

> Hi,
>
> It's pretty much impossible, since we don't know what GIS software you
> used, what commands, what R package and code, or what your data look
> like.
>
> As a starting point, I'd suggest carefully rereading the help files
> for both the GIS and the R functions, to make sure that they are doing
> the same thing, and what you expect them to, and to review your data
> in both places to ensure that it is the same values and projection,
> etc. It is entirely possible that one software is scaling your data
> for you automatically, or some other processing step that is not
> duplicated by the other software.
>
> If trying those things doesn't clarify it for you, then please post
> back to the list with more information about the software and data
> you're using.

Yes, the problem is most likely that the weights and data are the same, 
but in GIS or R the data are sorted differently than the weights. 
Alternatively, the weights may be different for the same data. For R, it 
would help to see how you constructed the weights object. If the GIS is 
ArcGIS, for the same weights and data, we know what differences may be 
expected, and any such differences would not affect your conclusion.

Roger

>
> Sarah
>
> On Sat, Apr 14, 2018 at 1:18 AM, Yalemzewod Gelaw <yalassefa at gmail.com> wrote:
>> Hi
>>
>> I tried to compute the Moran's I statistics using GIS and R. However, I got
>> different values.
>>
>> Could you please brief me how the difference can occurs?
>>
>> Using GIS
>>
>>  Global Moran's I Summary
>>
>> Moran's Index:   0.151485
>>
>> Expected Index:  -0.007692
>>
>> Variance:        0.001040
>>
>> z-score:         4.935027
>>
>> p-value:         0.000001
>>
>>
>>
>> Using R
>>
>> Moran I test under randomisation
>>
>> data:  Dat$allprop
>>
>> weights: Xlist
>>
>> Moran I statistic standard deviate = 0.82453, p-value = 0.4096
>>
>> alternative hypothesis: two.sided
>>
>> sample estimates:
>>
>> Moran I statistic       Expectation          Variance
>>
>>       0.034154753      -0.007299270       0.002527644
>>
>> NB: in the neighbour links there are 2 regions with no links
>>
>>
>> Thank you for any help
>>
>>
>>
>> *Regards, *
>>
>> Yalem
>
>
>
>

-- 
Roger Bivand
Department of Economics, Norwegian School of Economics,
Helleveien 30, N-5045 Bergen, Norway.
voice: +47 55 95 93 55; e-mail: Roger.Bivand at nhh.no
http://orcid.org/0000-0003-2392-6140
https://scholar.google.no/citations?user=AWeghB0AAAAJ&hl=en



More information about the R-sig-Geo mailing list