Roger,

Thanks for your reply.
That's exactly what the problem is.


2011/3/19 Roger Bivand <Roger.Bivand@nhh.no>

> On Thu, 17 Mar 2011, Mathieu Rajerison wrote:
>
>  Hi list,
>>
>>
>> I performed the EBlocal function on my dataset, but I got the following
>> error:
>>
>>  res <- EBlocal(agg$NPARBAT, agg$Expected, nb)
>>>
>> Erreur dans lag.listw(lw, (ni * (xi - m.i)^2), zero.policy = zero.policy)
>> :
>>  Variable contains non-finite values
>>
>>
> Almost certainly at least one of the values in agg$Expected is zero.
> Indeed, this should not be the expected count, but rather the populations at
> risk, as explained in ?EBlocal, which should all be positive numbers. So you
> are most likely not using the function correctly.
>
> Hope this helps,
>
> Roger
>
>
>> I noticed someone else got the same error message as in this message:
>> http://www.mail-archive.com/r-sig-geo@stat.math.ethz.ch/msg07922.html
>>
>>
>> Apparently, it was fixed in the latest version of spdep. My version is
>> 0.5-29 (the latest, I think) as the sessionInfo() indicates:
>>
>>  sessionInfo()
>>>
>> R version 2.11.1 (2010-05-31)
>> i386-pc-mingw32
>>
>> (...)
>>
>> other attached packages:
>> [1] rgdal_0.6-28       spdep_0.5-29       coda_0.14-2
>> deldir_0.0-13
>> [5] maptools_0.7-38    foreign_0.8-40     nlme_3.1-96
>> MASS_7.3-6
>> [9] Matrix_0.999375-39 lattice_0.18-8     boot_1.2-42
>> sp_0.9-76
>>
>> loaded via a namespace (and not attached):
>> [1] grid_2.11.1  tools_2.11.1
>>
>>
>> Any help would be greatly appreciated!
>>
>> Mathieu
>>
>>        [[alternative HTML version deleted]]
>>
>> _______________________________________________
>> R-sig-Geo mailing list
>> R-sig-Geo@r-project.org
>> https://stat.ethz.ch/mailman/listinfo/r-sig-geo
>>
>>
> --
> 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@nhh.no
>
>

	[[alternative HTML version deleted]]

