> Dear all,
> I have been trying to obtain local Moran’s I with the exact approach
> (localmoran.exact) but I have some issues and would need your help.
A complete reproducible example is required (script and data, data may be
downloaded, do not attach). Does the same thing happen with
> I am trying to bring to light how spatial patterns of wealth have
> evolved from 2000 to 2016 in the European Union.
> Looking at the Regional Gross Domestic Product (GDP) of European regions, my lm model looks like this :
> where log(EU_NUTS@data[,year[i]]) are log of regional GDPs
Never, ever use @ to access data. EU_NUTS@data$NUTS_L1 should be
EU_NUTS$NUTS_L1 and should be (made a) factor first. It isn't clear what
log(EU_NUTS@data[,year[i]]) will end up being - is "year" a character
vector? If so, EU_NUTS[[year[i]]] is the correct syntax.
> and factor(EU_NUTS@data$NUTS_L1) is the vector of country dummies.
> Sadly, I obtain an error message that says :
> Error in integrate(integrand, lower = 0, upper = upper) :
> a limit is missing
> Moreover : Warning messages:
> 1: In sqrt(2 * t2 - t1^2) : production of NaN
> 2: In sqrt(2 * t2 - t1^2) : production of NaN
> According to the GitHub source code ,
No, as you can see from https://cran.r-project.org/package=spdep, the
development site of spdep is https://github.com/r-spatial/spdep/. Never
use non-authorised copies. To see the source, simply type the function
name. Use debug(localmoran.exact) to step through the function while it
runs, to see the values of the objects you are in doubt about. Do not do
this in RStudio, its debugging interface tries to be far too clever.
The following is illegible in plain text; post in plain text only.
> Le 14 août 2018 à 20:09, Roger Bivand <[hidden email]> a écrit :
> If you post, you then reply in-thread on the list. Otherwise, nobody else knows what the resolution was. :
Sorry. My bad.
> Your explanation below contains lots of inaccuracies - all Spatial*DataFrames have standard data.frame access methods as I showed.
No doubt about it ! I will try do better now that I know about it.