On Tue, 16 Feb 2010, [ISO-8859-1] Patricio Cuar�n wrote:
On Tue, Feb 16, 2010 at 3:30 PM, Allin Cottrell
<cottrell(a)wfu.edu> wrote:
> I think it would be more productive to spend time making "Data
> append/update" easier and more fool-proof rather than trying
> to extend gretl's spreadsheet capabilities:
I agree. A couple of suggestions:
1. One thing that would be an improvement is that presently yo
must have exactly the same number of observations in the data to
be imported as you have in gretl. If you have 1990-2006 in gretl
and 1980 - 2009 in a csv or in Excel, gretl says "Data frequency
does not match".
I'll just address the first suggestion at this point. I don't mean
to be defensive, but the statement above is not accurate.
If gretl can determine, from the data file to be appended, a set
of observation numbers/dates that makes sense in relation to the
original data, then the append goes through fine even though the
observation ranges are not the same. Furthermore, gretl bends
over backwards to to try parse sensible observation numbers/dates
out of the file to be imported. (As stated in the manual, the
observations column should be headed "obs" or "date" to help
gretl.)
Here are some examples that I just verified. First, we open the
annual data file data3-6.gdt, which runs from 1959 to 1994. Then
we try appending ("/File/Append data/text/CSV...") the file whose
content is as follows:
year,z1,z2
1970,1,2
1971,2,3
1972,3,4
No problem, it's appended correctly, with the observations for the
two added variables placed properly with regard to date.
Now we try the quarterly data file data9-7.gdt, which runs from
1975:1 to 1990:4. We try appending in turn plain text files with
the following content:
1)
obs,x1,x2
1990:3,20,30
1990:4,30,40
1991:1,40,50
2)
obs x1 x2
1990Q3 20 30
1990Q4 30 40
1991Q1 40 50
3)
obs x1 x2
1991.1 20 30
1991.2 30 40
1991.3 40 50
All of these are handled correctly, whether comma-separated or
space separated, whether the year/quarter boundary is represented
by ":", "Q" or ".", and whether the new data overlap the
original
observations and extend the dataset by by one observation (the
first two cases), or "stick onto the end" of the original data and
extend the dataet by the full number of new observations (case 3).
Nothing in this regard has been changed since the 1.8.7 release,
so I'm not drawing on brand-new CVS behavior.
Allin Cottrell