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
following format:
Obs No Neighbor1 Neighbor2 Neighbor3 ... Neighbor n
1 nn1 nn2 nn3 nnN
2 nn1
...
n
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.
Cheers !
Franck
--
Franck Nadaud
Economiste
CIRED
UMR 8568 CNRS - EHESS
45 bis avenue de la Belle Gabrielle
94736 Nogent-sur-Marne Cedex
TEL 33-1-43-94-73-94
FAX: 33-1-43-94-73-70
MOB: 06-07-39-92-75
France