On Thu, 29 Nov 2007, Ignacio Diaz-Emparanza wrote:
El Thursday 29 November 2007 11:02:03 Franck Nadaud escribió:
> Hello listers ! greetings from Paris !
>
>> This would be brilliant.
>
> Sure it would be useful in some contexts. I am on the way to convert some
> old scripts I wrote in SPSS matrix processing language some (long) time
> ago. I plan to propose the Moran and Geary spatial correlation coefficients
> first. They are used as residuals mispecification tests when a regression
> model uses data related to a spatial context (States, counties, measure
> stations, etc...).
>
>> One of the thing planned for future versions is a function for
>> reading/writing matrices from/to csv files. Would this be useful to you?
>
> That would be exactly what is needed for the task. In fact most spatial
> analysis toolboxes / softwares proceed exactly that way around.
There is'nt actually a standard procedure for saving and reading matrices,
but Allin was working about this subject some months ago. You can read his
message to the gret-devel list in
http://lists.wfu.edu/pipermail/gretl-devel/2007-April/000326.html
Probably I should not recommend this tricky procedure to everyone, but ....
I agree this is very long-winded and cumbersome. In my local tree here
I've written two new functions to read/write matrices more easily, as in
matrix X = mread("foo.csv")
scalar errcode = mwrite(X, "bar.csv")
However, I won't commit them until Allin has seen them: they're full of
non-obvious choices, and probably of programming mistakes, so don't hold
your breath. Anyway, this is the direction that seems sensible to me. If
people come up with better ideas, they're most welcome.
Riccardo (Jack) Lucchetti
Dipartimento di Economia
Università Politecnica delle Marche
r.lucchetti(a)univpm.it
http://www.econ.univpm.it/lucchetti