Built-in spreadsheet improvement
by Henrique Andrade

Dear Gretl Team,
Recently I convinced my organization (the largest Brazilian bank) to replace
EViews by Gretl. Now they are in a transition process and are feeling a
little bit lost. In the most of time I can help them, but a new question
arose and I can't do nothing.
The question is related with appending and updating data. I know that is
possible to do this using the menu option "File -> Append data", but this is
not as intuitive as opening the Gretl's built-in spreadsheet to change the
values (at least, it is not intuitive for my colleagues). It's important to
keep in mind that they are from "EViews & Windows Land" and aren't familiar
to any script language.
So I would like to request you to allow multiple selection on Gretl's
built-in spreadsheet in order to copy, cut, and paste data just like
Gnumeric, Excel, and others do. Is this possible?
Best regards,
Henrique C. de Andrade
Doutorando em Economia Aplicada
Universidade Federal do Rio Grande do Sul
www.ufrgs.br/ppge
13 years, 7 months

gmm restrict error
by Sven Schreiber

Hi,
I can't seem to use the new restrict after gmm feature.
<script>
open denmark
series y = normal()
series x = normal()
/* initialize stuff */
series e = 0
scalar beta = 0
matrix V = I(1)
/* proceed with estimation */
gmm
series e = y - x*beta
orthog e ; x
weights V
params beta
end gmm
restrict
beta = 3
end restrict
</script>
gives
? restrict
? beta = 3
? end restrict
Restriktion:
= 3.05173
Nicht genügend Speicher!
Fehler bei Skriptausführung: Stopp
> end restrict
= out of memory error!
thanks,
sven
13 years, 7 months

ema, obs and optional parameter
by Ignacio Diaz-Emparanza

Allin,
I am teaching on these days a very basic course on forecasting.
A part of the course is about smoothing models so I was looking at
exponential smoothing and today I was also preparing a script about the
Brown models for linear and quadratic local trends.
I would like to report some small problems I found:
1- The exponential moving average exist only at the GUI but there is not
an equivalent command script for that. I had to prepare a user function.
2- When I finished to prepare a first version of this function I noticed
that it only worked for quarterly data ( I suppose monthly as well ) but
not for annual data. The problem was about the different behaviour of
the 'obs' function with annual data (I saw this in the manual for
'genr'). If you use, for example,
series s1 = (obs=1) ? y[1] : delta*y+ (1-delta)*s1(-1)
this will work for quarterly or monthly data, but not in the same way
for annual data. Finally I found a solution, but it implied that my
script grew up in 10 lines!
Don't you think that 'obs' should work in the same way, idependently of
the value of $pd?
3- Finally I saved my Brown function as a function package ( I uploaded
it to the server as well), but I see another small problem: my main
function returns a list and if one wants the package to work ok this
list is mandatory, but the dialog box says "Assign return value
(optional)". ¿is there any way to change this to 'required'?
--
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.ea3.ehu.es
13 years, 7 months

filters: functions and GUI
by Allin Cottrell

In response to comments from Ignacio and Patricio I have now
enhanced the functions movavg, hpfilt and bkfilt so that it's
easier to do via the command-line what you can do via the GUI
filter dialogs (please see the updated function reference for
details). And if you save filtered series via the GUI that is now
recorded in the command log.
Allin.
13 years, 7 months

'omit' issues
by Sven Schreiber

Hi,
two small things:
mysig = 0.05
omit --auto=mysig
doesn't seem to work (using a variable as the cutoff significance
level). For scripting this is unfortunate.
Also it seems that
omit ... --quiet
does not replace the current model with the restricted (smaller) one.
This is even explained in the help text (thanks for that!), but I wonder
if that isn't a slight abuse of the --quiet switch. I used it because I
merely wanted to suppress output, as usual in other contexts. It seems
to me that the model replacement feature deserves its own switch, such as
omit ... --replace
or somesuch.
thanks,
sven
13 years, 7 months

xcorrgm and pergm
by Sven Schreiber

Hi,
not sure what the current status is of corrgm and xcorrgm: xcorrgm is
missing in the function reference, but mentioned recently in the
changelog. OTOH, doesn't the third optional parameter of corrgm cover
the xcorrgm case? I know we had a discussion about that API, but I don't
remember the outcome.
W.r.t. pergm I have a feature request: would it be possible to allow a
matrix argument to get the periodograms/spectra of all columns of the
matrix at once?
thanks,
sven
13 years, 7 months

"goodies" for function writers
by Allin Cottrell

New in CVS:
1) smpl <varlist> --contiguous
"The --contiguous form of smpl is intended for use with time
series data. The effect is to trim any observations at the start
and end of the current sample range that contain missing values
(either for the variables in varlist, or for all data series if no
varlist is given). Then a check is performed to see if there are
any missing values in the remaining range; if so, an error is
flagged." Designed for use by function writers who want to ensure
they have a clean sample for doing time series things where
embedded NAs are a problem. See also point 3 below.
2) gnuplot <specs> --output=display
Modifies the usual behavior of gretl's gnuplot command when in
script mode; as in interactive mode, the graph is displayed in a
window.
3) Experimental: commands may be prefixed with "catch ", and the
effect is that gretl does not stop running a script if executing
the command produces an error. Instead the internal error
variable, accessible via $error, is set. This is intended to be a
more general and flexible replacement for the --continue flag
that's currently available for a few commands. E.g.
catch smpl <varlist> --contiguous
if $error
# respond appropriately
endif
This should work OK for block commands such as mle: the "catch"
applies to the whole block. It does not protect against errors in
parsing commands, only execution. If you use this facility, you
should always check $error immediately afterwards or things are
likely to get very confused. Accessing $error causes the internal
error code to be cleared.
The "catch" facility almost surely has bugs at this point.
Allin.
13 years, 7 months

console bug
by Patricio Cuarón

When there is a selection on the console and you press the *control* key,
the selection is dropped and the cursor returns to the last prompt line.
Thus, you can't copy by using Ctrl+C, your only option is to use the copy
icon. (I think this worked ok some time ago...)
Bye!
13 years, 7 months

adf and restricted samples
by Patricio Cuarón

Is it correct that ADF always uses the whole range instead of the current
sample?
? adf 8 log(salarios) --ct
> Augmented Dickey-Fuller test for l_salarios
including 8 lags of (1-L)l_salarios
sample size 19
unit-root null hypothesis: a = 1
> with constant and trend
model: (1-L)y = b0 + b1*t + (a-1)*y(-1) + ... + e
1st-order autocorrelation coeff. for e: 0,179
lagged differences: F(8, 8) = 4,559 [0,0231]
estimated value of (a - 1): -0,979101
test statistic: tau_ct(1) = -5,3047
asymptotic p-value 4,382e-005
> ? smpl
Full data range: 2002:1 - 2008:4 (n = 28)
> ? smpl
Full data range: 2002:1 - 2008:4 (n = 28)
Current sample: 2004:1 - 2008:4 (n = 20)
> ? adf 8 log(salarios) --ct
> Augmented Dickey-Fuller test for l_salarios
including 8 lags of (1-L)l_salarios
sample size 19
unit-root null hypothesis: a = 1
> with constant and trend
model: (1-L)y = b0 + b1*t + (a-1)*y(-1) + ... + e
1st-order autocorrelation coeff. for e: 0,179
lagged differences: F(8, 8) = 4,559 [0,0231]
estimated value of (a - 1): -0,979101
test statistic: tau_ct(1) = -5,3047
asymptotic p-value 4,382e-005
Thanks!
13 years, 7 months

console bug
by Santiago Afonso

When there is a selection on the console and you press the *control* key,
the selection is dropped and the cursor returns to the last prompt line.
Thus, you can't copy by using Ctrl+C, your only option is to use the copy
icon. (I think this worked ok some time ago...)
Bye!
13 years, 7 months