continuing on errors
by Allin Cottrell
On Tue, 9 Jun 2009, Renju Jacob wrote:
> I was pondering over a question about gretl. Say, I use one
> script session to compute nls mutliple times. Now, in one of the
> iterations, the script encounters an error (eg missing values,
> failed Jacobian etc). Is there a way for me to tell it to
> continue going through the rest of the script without halting?
Good question. We have two mechanisms that are supposed to be
relevant here. You can set the environment variable
…
[View More]GRETL_KEEP_GOING (e.g. GRETL_KEEP_GOING=1), or you can use the
"set" command:
set halt_on_error off
However, I realized recently that neither of these options was
working quite as intended (although the environment variable
approach should work OK with gretlcli). I've therefore made some
changes in CVS and the current Windows snapshot, and I think
setting halt_on_error to "off" should now do the job.
Two further points:
1) If an error occurs when "compiling" a loop or user-defined
function, script execution will halt regardless.
2) I have added a "--continue" option for the commands arma,
garch, nls, mle and gmm. This is a weaker, and perhaps more
useful, variant on setting halt_on_error off. The effect is that
if a _numerical_ error occurs (e.g. non-convergence, failure to
compute the Jacobian) gretl continues, but sets the internal
variable $error to a non-zero value. (If a non-numerical error,
such as failure to allocate memory, occurs, gretl halts as usual.)
Therefore, after using one of these commands with the --continue
option, you can check the value of $error and act appropriately.
Note that while you cannot set the value of $error yourself,
referencing "$error" causes this variable to be reset to zero.
Allin Cottrell
[View Less]
15 years, 9 months
Creating variables
by Data Analytics Corp.
Hi,
I'm new to GRETL so please excuse the following naive question. How do
I create a new variable in a script? Here's my problem. I have a
monthly times series from 1960:1 to 2009:4. One variable is the monthly
cpi. I merely want to calculate the percent change on an annual basis.
I used the following:
genr pct = (((cpi/lags(1, cpi))^12)-1)*100
and got
gretl version 1.8.0
Current session: 2009/06/10 19:29
? genr pct = (((cpi/lags(1, cpi))^12)-1)*…
[View More]100
Data types not conformable for operation
Error executing script: halting
> genr pct = (((cpi/lags(1, cpi))^12)-1)*100
What's wrong? What's conformability have to do with this? Conformable
on what? Also, I did the following:
genr lag = lags(1, cpi)
and got
gretl version 1.8.0
Current session: 2009/06/10 19:32
? genr lag = lags(1, cpi)
Generated list lag
but lag was no where in my variable list, although cpi(-1) was. Can
someone explain how variables are created?
Any help is appreciated.
Thanks,
Walt
--
________________________
Walter R. Paczkowski, Ph.D.
Data Analytics Corp.
44 Hamilton Lane
Plainsboro, NJ 08536
________________________
(V) 609-936-8999
(F) 609-936-3733
dataanalytics(a)earthlink.net
www.dataanalyticscorp.com
[View Less]
15 years, 10 months
Can i append new
by Victoria Perez
Hi, i want append imported data, adding variables into an exisiting dataset.
¿what can i do?
thanks, Victoria
15 years, 10 months
Stata import, glib error
by Cristian Rigamonti
Hi, when importing a stata .dta file, I get the following popup error message
(which I learned is coming from the glib library)
"Invalid byte sequence in conversion input"
The data import seems to go OK, but I'm wondering if this may be related to
import from stata or other reasons, anyone else experienced that?
Also during import, I get these messages in the xterm:
...
(lots of output)
...
variable 3: "value label" = '__MERGE'
breaking on feof
I'm not really sure about the …
[View More]meaning of the second-last line (the variable in
question is a binary 0/1 variable and gets imported OK).
Cri
--
GPG/PGP Key-Id 0x943A5F0E - http://www.linux.it/~cri/cri.asc
[View Less]
15 years, 10 months
Problem storing scalars
by Federico Tamagni
Dear all,
I need to save the R_squared into a file outside gretl, and my guess is
there is a problem on how to store scalars.
Suppose I run a simple panel regression:
panel Y const X
Then, to retrieve the R_squared I use the command:
genr R2 = $rsq
which work fine as a get the message: "Generated scalar r2 = 0.89778".
Now, in order to store this in a file, untill few weeks ago I was using
the store command, in this way:
store --csv path_to_myfile/my_file r2
However this does not …
[View More]work anymore, as I receive the following error
message: " 'r2' is not the name of a series "
Is something changed in the way scalars are dealt with ?
Thank you everybody,
Federico
--
Federico Tamagni, PhD
Research Fellow
LEM - Laboratory of Economics and Management
Scuola Superiore Sant'Anna, Pisa, Italy
Phone: (+39)-050-883341
Fax: (+39)-050-883344
email: f.tamagni(a)sssup.it
website: https://mail.sssup.it/~f.tamagni/
[View Less]
15 years, 10 months
VEC Question
by Ricardo Gonçalves Silva
Hi,
I'm estimating some VEC models and I would like to know if there is a way to choose specific lags for the model.
Using the GUI, if I select 12 lags, GRETL uses lags 1 to 12; but I just want lag 12.
Any help?
Thanks
Rick
15 years, 10 months
individuals to household
by Sebastián Goinheix
Hello everyone:
I need to convert a database of individuals in a household one. How can I do
that?
Like "egen" of STATA, for example: egen equivh=sum(equiv), by(correlat
anio).
I don't find anything in the manual and the user's guide.
Thanks
--
Sebastián Goinheix
http://sites.google.com/site/goinheix
Por favor, considere su responsabilidad ecológica antes de imprimir este
e-mail.
15 years, 10 months