some options that aren't syntax-colored
by Sven Schreiber
Hi,
stumbled across these while checking the documentation:
- -impulse-response (var command)
- -suppress-fitted (gnuplot)
- -inverse-fit (gnuplot)
- -loess-fit (gnuplot)
Probably not exhaustive.
cheers
sven
4 years, 3 months
changelog additions
by Sven Schreiber
Hi,
OK to add the following stuff to the ChangeLog and CompatLog files on
git? (and thus eventually also on
http://gretl.sourceforge.net/ChangeLog.html and
http://gretl.sourceforge.net/Backward.html AFAIK)
- 2020e (in progress): fix for the non-working GUI dialog for 'join' on
Windows
- 2018b (?): new outfile...end outfile block syntax
- [unknown version, please help with that]: the sprintf command became
deprecated (not the sprintf() function which should be used instead)
- 2020a/b (?): eigengen() renamed to eigen()
I can apply those changes if there are no objections. More details about
the version numbers and so on would be welcome.
cheers
sven
4 years, 3 months
Re: Simulate simultaneous equation model
by Riccardo (Jack) Lucchetti
On Mon, 14 Sep 2020, Adam Elderfield wrote:
> One challenge would be translating what is an acceptable way to express
> an equation in GRETL into something that can be read in BIMETS for
> example:
>
> "ln (Y/Y(-1)) = coef(1)*(ln(Y(-1))-coef(2)*ln(X(-1)))+coef(3)*ln (Y(-1)/ Y(-2)) + coef(4)*ln(X/X(-1))"
That's what the main difficulty is. At present, we have very good
technology for estimating _linear_ simultaneous systems. If we keep
within the realm of linearity, simulating from a simultaneous system is
trivial if the system is static (just compute the reduced form and you're
done) and only slightly more intricate if you have lags (you need to cast
the reduced form into a finite-order VAR and use varsimul()).
The real problem is that at present we don't have a way for representing,
let alone estimating, systems with nonlinearities, eg something like this:
y_t = a0 + a1 * x_t + u_t
log(x)_t = b0 + b1 * log(y)_t + e_t
The only way we have at present to estimate something like that is to
write ad-hoc functions for representing the system and then using GMM (for
nonlinear IV) or MLE (if you choose FIML/LIML). Then, once you have
coefficients for the structural form, simulation entails calculating the
endogenous variables for a given realisation of the exogenous variables
(and possibly of the structural disturbances, but I digress), which has to
be done via iterative methods; IIRC, Gauss-Seidel is the industry
standard. Again, this can be written in Hansl, but it's far from trivial.
In fact, we have an expert here among the mailing list members, that is
Francesca Di Iorio. Francesca, would you like to comment?
-------------------------------------------------------
Riccardo (Jack) Lucchetti
Dipartimento di Scienze Economiche e Sociali (DiSES)
Università Politecnica delle Marche
(formerly known as Università di Ancona)
r.lucchetti(a)univpm.it
http://www2.econ.univpm.it/servizi/hpp/lucchetti
-------------------------------------------------------
4 years, 3 months
help: an issue with dummies using weekly data
by Daniel Ventosa-Santaulària
Hello everybody:
Last week I was working with a weekly data set of my own. I tried to
include a dummy variable (to model a break) and found that the instruction
in Gretl was not working properly; the dummy variable is created, but
filled only with zeros; no "ones" are included after a precise date. At
first I thought it was a problem with my data, but then I tried with a
sample file and the problem persists. I am using gretl 2020d. Below I
provide an example code to show what the problem is:
#___________________________
clear
open nysewk.gdt
series Dummy = obs>=1995-02-22 && obs<=2006-07-27
series Dummy2 = obs>=1995-02-22
gnuplot Dummy Dummy2 --time-series --output="display"
#___________________________
Thanks in advance.
Friendly,
D.
* Daniel Ventosa-Santaulària*
* Banco de México & **CIDE*
- http://www.ventosa-santaularia.com
4 years, 3 months
Re: Simulate simultaneous equation model
by Sven Schreiber
Am 14.09.2020 um 09:30 schrieb Adam Elderfield:
> Yes, that is how I think I would attack it. I think a simple solution would be to create a function that takes estimated parameters and writes them to a text file which BIMETS will read as an identity.
I don't think it would be correct to label these equations as
identities. (If I'm not misunderstanding what you meant.) The simulation
will often be stochastic and thus an error term plus estimated variance
would be needed. I don't think that's a problem per se, but so far I
don't know how to tell bimets the estimation results including those
variances and so on, or more fundamentally if there's some kind of
interface in bimets for this "injection" of already estimated but
non-identity equations.
> One challenge would be translating what is an acceptable way to express an equation in GRETL into something that can be read in BIMETS for example:
>
> "ln (Y/Y(-1)) = coef(1)*(ln(Y(-1))-coef(2)*ln(X(-1)))+coef(3)*ln (Y(-1)/ Y(-2)) + coef(4)*ln(X/X(-1))"
>
> While BIMETS it would be something like:
>
> "TSDELTALOG(Y) = coef(1)*(TSLAG(LOG(Y),1)-coef(2)*TSLAG(LOG(X),1))+coef(3)*TSDELTALOG(Y,1) + coef(4)*TSDELTALOG (X)"
>
> So I think a small task would be to parse a GRETL acceptable language (I'm not sure if my equation above is an acceptable format for GRETL, but I hope illustrates the point?) into something readable by BIMETS, i.e. replace the (-1) with TSLAG etc and hard code the coefficient estimates from various estimation outputs in the GRETL environment to the text file.
All very adequate thoughts, but I will reply to Jack's answer first, as
it is more fundamental...
cheers
sven
4 years, 3 months
Re: Simulate simultaneous equation model
by Sven Schreiber
Am 12.09.2020 um 23:59 schrieb Adam Elderfield:
> Hi Sven,
>
> The BIMETS package is really great. That might be a good starting point.
> Although, and maybe I am wrong here, I would consider the parsing of the
> model text one of the main programming challenge, I'm not sure that
> would be any easier porting between two languages? Or would you write
> your model file in BIMETS syntax, have your regression etc in Gretl,
> which then are passed to the text file, and this data and text are then
> passed to R?
>
I wasn't familiar with the bimets package until you mentioned it; now
I've quickly browsed its vignette.
I agree that doing the estimation in gretl makes sense, since that is
what we already have, and possibly even with more options than what's
present in bimets.
The trick would then be to "inject" the estimation results into bimets,
such that the coefficients and so on are already given and no redundant
estimation has to be done there. (Of course if it's just the OLS option
then any redundancy would be small, but more general estimation
approaches are reasonable and needed.) The point would then be to take
advantage of the simulation features of bimets, which is what we don't
have in gretl.
Perhaps the author Andrea Luciani would be ready to help us by
describing the interface through which bimets would treat the estimation
as done and how to specify the results from that step exactly.
(Vectors/Matrices with certain names and so on.)
The nice thing about bimets is that it doesn't depend on other packages
apparently, so no dependency chain issues would arise.
cheers
sven
4 years, 3 months
Re: Simulate simultaneous equation model
by Riccardo (Jack) Lucchetti
On Fri, 11 Sep 2020, Adam Elderfield wrote:
> Thanks for the reply! I've found Andrea Luciani very helpful with BIMETS
> questions, so I'm glad to hear they're interested in Gretl!
>
> Sorry below should have read "I'm not 100% across Hansl" but would you
> undertake project with Hansl? Say for example, how would I create a menu
> item "model" which would prompt user to a) create a model , b) work with
> a model?
Well, there's only so much you can do in Hansl. One thing you _can't_ do
is adding arbitrary elements to the menu for the gretl GUI clients. It
looks as if BIMETS creates by parsing a text file in special syntax. That
is certainly doable in hansl.
-------------------------------------------------------
Riccardo (Jack) Lucchetti
Dipartimento di Scienze Economiche e Sociali (DiSES)
Università Politecnica delle Marche
(formerly known as Università di Ancona)
r.lucchetti(a)univpm.it
http://www2.econ.univpm.it/servizi/hpp/lucchetti
-------------------------------------------------------
4 years, 3 months
Re: Simulate simultaneous equation model
by Riccardo (Jack) Lucchetti
On Fri, 11 Sep 2020, Adam Elderfield wrote:
> I think this could be a great start, there are also other
> open source example to leverage off - the BIMETS package in R, which is
> leaps and bounds better than what I have done, and Ray Fair's FORTAN
> code.
I've just noticed that one of the authors of BIMETS is Andrea Luciani, who
uses gretl, was very favourably inclined towards the project and would
probably help us out to some extent (not by writing any code, but by
giving us advice on what to do and how). If you decide to get started on
this, I can put the two of you in touch with one another.
> In any case, I think this would be a great addition to GRETL, and
> I'd love to start developing it. Has anyone else embarked on this
> journey? Could we potentially collaborate?
Sven was interested in this some time ago, perhaps he still is.
> I'm 100% across the programming in GRETL/HANSL, but I am assuming that
> one would start by defining a model object that has some procedures,
> like simulate etc. Does HANSL support OOP?
No; the standard way in Hansl is to pack stuff into bundles and the write
functions that operate on them.
-------------------------------------------------------
Riccardo (Jack) Lucchetti
Dipartimento di Scienze Economiche e Sociali (DiSES)
Università Politecnica delle Marche
(formerly known as Università di Ancona)
r.lucchetti(a)univpm.it
http://www2.econ.univpm.it/servizi/hpp/lucchetti
-------------------------------------------------------
4 years, 3 months
Simulate simultaneous equation model
by Adam Elderfield
Hi,
I am interested in developing a set of procedures that will simulate a simultaneous equation model, like Eviews' model object. I've got some programs that I have cobbled together in R that simulate a model based on a Gauss-Seidel algorithm. Basically, a model is written in a text file which is parsed and equations are evaluated line by line until convergence. I think this could be a great start, there are also other open source example to leverage off - the BIMETS package in R, which is leaps and bounds better than what I have done, and Ray Fair's FORTAN code. In any case, I think this would be a great addition to GRETL, and I'd love to start developing it. Has anyone else embarked on this journey? Could we potentially collaborate?
I'm 100% across the programming in GRETL/HANSL, but I am assuming that one would start by defining a model object that has some procedures, like simulate etc. Does HANSL support OOP? The R approach I have used is a bunch of functions that are packaged up to achieve the same thing.
Any help would be appreciated!
Thanks
Adam Elderfield
4 years, 3 months
entering string-valued series directly
by Sven Schreiber
Hi, as per section 15.2 of the guide it is not supported to enter the
contents of string-valued series manually (in the GUI).
But I guess sometimes it would be useful to be able at least to edit
those series, or what would be the suggested way to change, say, a
single value (obs) of a string-valued series?
thanks
sven
4 years, 3 months