[Gretl-users] GRETL Feature Suggestion

Allin Cottrell cottrell at wfu.edu
Tue May 2 21:51:04 EDT 2006


On Tue, 2 May 2006, Talha Yalta wrote:

> I am a Ph.D. candidate at Fordham University in NY and I am 
> using Gretl extensively for a few months now. I am a big fan of 
> linux and open source software and I must say I am very 
> impressed with Gretl. I would like to thank all the contributors 
> for bringing us this elegant and very high quality software 
> which is a pure joy to use.

Thank you, glad you like the program!

> I would also like to suggest a few new features:
>
> I usually work with PSID data that contains more than 200 
> columns and 30000 rows and I need to create a number of dummies 
> and bring the sample to a more manageble size (say 4000 
> observations)...
>
> Now, I know that Gretl has a built in spreadsheet and it looks 
> like it is quite efficient. So I think it would be a great idea 
> to improve this feature a little bit:
>
> (1)- First of all, when I try to open my data in spreadsheet 
> mode I get an error message saying that I cannot open 
> spreadsheet that has more than 1600 rows.

This limitation is specific to the Windows version of gretl, and 
it stems from the gui toolkit (GTK+) that gretl uses.  For some 
obscure reason, connected I think with support for Windows 98, the 
sort of GTK window that gretl uses for its built-in spreadsheet 
can't currently have more than about 1600 rows without falling 
apart, on the MS Windows platform.

> (2)- Related with (1), is there a limit in the number of columns 
> in Gretl's spreadsheet?

Not that I know of, but there may be a de facto limit for that 
sort of GTK window on MS Windows, again.

> (3)-Of course we need the ability to do some basic mathematical and
> logical operations within cells so that we can easily define new data
> columns. I know we can use the console or the data menu to add new
> variables such as logs, dummies and lags based on existing variables
> but this is not enough.
> Consider a simple command that can be used in other spreadsheets:
> "=IF(AND(A1=1,B1=1),LOG(C1),"na")"

Gretl, along with most other econometrics programs, defines such 
transformations using named variables rather than cell-ranges. 
You have the boolean operators (&,|,=,!) to work with (see the 
entry for "genr" in the gretl manual).  For example, assuming that 
variables named 'A', 'B' and 'C' already exist:

newvar = (A=1&B=1)*log(C) + !(A=1&B=1)*NA

This sort of variable-generating command can be executed using a 
script, via the gretl console, or using the dialog box for 
"defining a new variable" at the foot of the Variable menu.

For this reason -- and also because gretl can import Excel and 
Gnumeric worksheets (with an OpenOffice import facility not too 
far off), so you can do data transformations using your favorite 
spreadsheet if you prefer that method -- it's not a high priority 
to offer a formula facility in gretl's built-in spreadsheet. 
This feature is really intended for data entry or minor editing of 
an existing dataset.

Allin Cottrell



More information about the Gretl-users mailing list