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 do it in this way: To save the matrix: <script> set echo off outfile --write "myfile.xml" print "<?xml version="1.0"?>" print "<gretl-matrices count="1">" print "<gretl-matrix name="mymatrix" rows="3" cols="2">" print "1.3 2.0" print "3.4 2.7" print "8.2 3.1" print "</gretl-matrix>" print "</gretl-matrices>" outfile --close set echo on </script> To read the matrix: include myfile.xml -- Ignacio Diaz-Emparanza DEPARTAMENTO DE ECONOMÍA APLICADA III (ECONOMETRÍA Y ESTADÍSTICA) UPV/EHU Avda. Lehendakari Aguirre, 83 | 48015 BILBAO T.: +34 946013732 | F.: +34 946013754 www.et.bs.ehu.es