On Wed, 18 Nov 2009, [ISO-8859-1] Patricio Cuar�n wrote:
Hello. I'm new to gretl and I'm trying to create a simple
script that will,
for instance, seasonally adjust all variables. And I've run into troubles.
So...
1. how do I generate variable *variable names* to genr? for instance, I want
to call each detrended variable "sa_" & the original variable name
2. how do I pass the parameter to deseas()? deseas(gdp) works fine, but
deseas(varname(4)) doesn't (assuming varname(4)="gdp", varname returns a
string and deseas doesn't work that way. I also tried looping through a list
of all the variables, but the same error of erroneous argument type is
brought up by deseas().
Look at chapter 9 of the User's Guide, on loop constructs.
<sample-script>
open data9-7
list L = QNC PRICE INCOME UNEMP
loop foreach i L
sa_$i = deseas($i)
endloop
</sample-script>
You can say
list L = dataset
if all the variables in the dataset are seasonally varying.
Allin Cottrell