Hi folks, greetings from Paris !
I am currently working on a spatial statistics project. I intend to develop
progressively some gretl functions to compute spatial correlation tests.
A difficulty is to handle spatial neighborhood matrices that are needed to
compute those tests. More specifically, I have an external file storing the
matrix in vector form: in the first column the list of the spatial units, and
in the second the list of their neighbors. The difficulty is that having two
different datafiles of different dimensions does not easily allow to pass the
contiguity matrix into the datafile containing the data to be analysed.
I guess it could be done with a null list and an append command into a loop,
provided a recoding is done so that the neighbor matrix is recoded eg, in the
Obs No Neighbor1 Neighbor2 Neighbor3 ... Neighbor n
1 nn1 nn2 nn3 nnN
where nn1-nnN is the Observation No of unit n
In this case handling is perfect. For now, I use a third party application to
do that. But would like to avoid that but I do not succeed in opening the
contiguity matrix file, recode it and store inot the datafile.
Any advice ?
Two, do the matrix commands support the boolean product command ? It would be
very useful for contiguity matrix handling purposes (ie, to compute the
neighbors of neighbors, etc...).
Three, if you are interested in this topic, I will gladly contribute my
developments to the community.
UMR 8568 CNRS - EHESS
45 bis avenue de la Belle Gabrielle
94736 Nogent-sur-Marne Cedex