SVAR Restriction
by Olasehinde Timmy
Dear Prof,
I am aware that the code 'SVAR_restrict(&x, "C", 1, 2, 0)' is to inform
Gretl of the nature of the restriction to estimate. I also know that this
has to be repeated for several restrictions like in the model. However, I
consider this to be rigorous especially when a large matrix is involved.
Although, I know how a matrix can be created and used with the SVAR GUI, I
don't know how it can be used with the SVAR_restrict(&x, ) function.
Please, I need to be enlighten if this is possible or if I have to do the
imputation for each restriction.
Thanks.
1 month, 4 weeks
Package updates (September 2024)
by Riccardo (Jack) Lucchetti
Dear all,
this message is to inform the community about the activity in our
function package repository: during the month of September 2024, 6
packages were updated to a new version:
"almonreg", by Allin Cottrell (Almon regression)
"latextab", by Artur Tarassow (fancy LaTeX tables from gretl matrices)
"stack_data", by Artur Tarassow (turn a panel dataset into time seriews
and back)
"yahoo_get", by Riccardo "Jack" Lucchetti (download data from Yahoo finance)
"getYahoo", by Yi-Nung Yang (download data from Yahoo finance)
"stat_match", by Paolo Chirico (matching estimators for treatment effects)
Also note that the "robust_RESET" package, by Oleh Komashko, is going to
be retired in the future since the same functionality will be present in
the upcoming version of gretl (2024c, due very soon).
-------------------------------------------------------
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
-------------------------------------------------------
1 month, 4 weeks
gretl 2024c released
by Cottrell, Allin
See https://gretl.sourceforge.net/index.html
Users of the 64-bit build of gretl on Windows: If you already have
gretl installed we strongly recommend uninstalling the old version
before updating to gretl 2024c.
Here's the change log:
2024-10-21 version 2024c
- Random number generation: add Dirichlet and generic discrete
distributions
- "summary" command with --by option: provide a $result matrix
if the list argument contains a single series, and improve
the format of the printout
- "corr" command: be more explicit about the sample(s) used
- "rename" command: add a --case option to support case
conversion of all series names in the dataset
- "reset" command: add a --robust option and scale the squares
and cubes of the fitted values to avoid numerical instability
- flatten() function: add an extra (vec-wise) mode for matrices
- matrix "left division" operator: improve efficiency when the
left-hand operand is triangular
- Fix bug: append via console not updating series list in the
main gretl window
- Fix bug: console command-line broken following use of "printf"
with no newline in the format
- Fix bug in "corrgm" command: spurious significance stars shown
for the PACF when the --bartlett option is given
- Fix bug in "adf" command (without the --gls option): error if
all of --c, --nc, --ct and --ctt were given
- Fix a lacuna in type-checking of hansl statements
- Fix: ensure that attempted use of the "smpl" command produces
an error if there's no dataset in place
- GUI: support the fixed-sample option when appending data
- GUI: random effects panel model: fix breakage in selecting
the --nerlove option
- GUI: support the --by option for the "summary" command, when
called via the main-window "View" menu
- GUI: fix the "Numerical summary" option in a window showing
a factorized boxplot (was broken for a string-valued factor)
- GUI: ensure that the "Compact data" and "Expand data" menu
items are disabled when the dataset is cross-sectional
- GUI: support Ctrl+L to clear the console
- GUI specification dialogs for calling packaged functions:
avoid mixture of languages so far as possible
- Fix bad behavior from "set force_decpoint off" for users in
a locale that normally uses decimal comma but who choose not
to use it
- Fix incorrect handling of ctrl-r (carriage return) in some
cases of script output
- Fix GUI language selection on recent macOS
- Fix relatively slow matrix inversion on Windows; speed-up
should be apparent for symmetric positive definite matrices
in particular
- Windows 64-bit build: link against MS UCRT; use GTK3; update
dependency DLLs and cross-compiler; make Consolas the default
monospace font
- SVAR addon: computational and graphical enhancements for
sign-restricted models; add more user-friendly methods for
specifying restrictions;
- Update translations: Galician, German, Italian and Polish
Allin Cottrell
2 months
gretl for Windows
by Cottrell, Allin
My apologies if you get this message twice, but I wanted to give it
maximum exposure.
Short story: with the next release, 2024c, we plan to make substantial
changes to our 64-bit Windows build (though mostly they will not be
very visible to users) and we'd like to get as many people as possible
to give the new build a try in advance of the release (currently
slated for the week beginning October 21).
As of later today, the snapshot on sourceforge labeled
gretl_install-64.exe will be the NEW build. If anyone tries it, has a
problem, and wants to revert, a "traditional" snapshot will still be
available:
https://sourceforge.net/projects/gretl/files/snapshots/gretl_install-64-g...
What's changed in the new build?
* We now link against the "new" (starting with Windows 10) Microsoft C
library, known as the Universal C Run-Time or UCRT. This is mainly a
matter of future-proofing, but it may bring improved performance in
some respects.
* The graphical interface now uses version 3 of GTK (as opposed to
GTK2). The main reason for this change is that gretl should look
better on small high-resolution displays (as on laptops) when
App-scaling is in force in Windows.
* Many of the other third-party libraries on which gretl depends have
been updated.
* The cross-compiler with which we build gretl has been updated from
gcc 10.3.0 to gcc 14.2.0.
Allin Cottrell
2 months, 1 week
how use modprint
by Paolo Chirico
Hello everyone
I have two 2x1 matrices: B.coeff and B.SE. I would like to use the
modprint command, but I have problems with the variable names.
For example, the following command gives me an error:
modprint {B.coeff, B.SE} " const, X"
What is the correct command?
Thanks,
Paolo
--
Paolo Chirico
RU e Prof.Agg. di Statistica Economica
Università del Piemonte Orientale
Dip. di Giurisprudenza e Scienze Politiche,
Economiche e Sociali (DIGSPES)
Alessandria, Italia
2 months, 1 week
the "gmm" command and the --lbfgs option
by Cottrell, Allin
This is a follow-up to the posting by Alecos P. at
https://www.mail-archive.com/gretl-users@gretlml.univpm.it/msg17410.html
The --lbfgs option asks gretl to use the limited-memory variant,
LBFGS, of the BFGS optimizer to minimize the GMM criterion. This can
sometimes be helpful (i.e. convergence is attained when it would not
be reached otherwise), though that was not the case in Alecos's
example.
However, LBFGS (unlike regular BFGS) supports the specification of
simple constraints on the parameter estimates. This feature has not
been exposed via the "gmm" command to date -- but see the functions
BFGScmax() and BFGScmin() for means of using this functionality.
These remarks are by way of lead-in to two changes in gretl's "gmm"
that are in today's snapshots.
1) There's now an optional parameter to the --lbfgs option: you can say
--lbfgs=<matrix-name>
where <matrix-name> is the name of a bounds matrix, whose
specification can be found in the help for BFGScmax (where the "c"
indicates "constrained"). In Alecos's example there are three
parameters, all of which should be non-negative, so employing the new
option one could do
matrix bounds = {1, 0, $huge; 2, 0, $huge; 3, 0, $huge}
gmm
...
end gmm --lbfgs=bounds
2) When LBFGS (or BFGS) converges there's no guarantee that gretl is
able to produce standard errors for the GMM parameter estimates. It
can happen that the required matrix J'WJ, where J is the (numerical)
Jacobian and W is the weights matrix, is not positive definite. Up
till now, if that happens we've flagged an error, with the not very
specific message "matrix is not positive definite". Now we don't flag
an error, and we print the estimates, but with the more specific
message "J'WJ is not positive definite, std. errors not available" --
and of course standard errors, z-scores and P-values are all NA.
Allin Cottrell
2 months, 1 week
Dynamic Multiplier in Dynamic Simultaneous Equation Models (DSEMs)
by Olasehinde Timmy
Dear Prof.,
I am researching Dynamic Simultaneous Equation Models (DSEMs), and I
understand that Gretl can handle this. I am certain of how endogenous
variables respond to exogenous variables; however, I have encountered
difficulty in algebraically demonstrating how endogenous variables could
respond to each other within the model, as I found in Oxmetrics. I would be
very grateful if you could assist me with materials that explain the
algebraic representation of the mechanics involved.
Yours
Timmy John
2 months, 2 weeks
GMM non-negativity constraints with --lbfgs option
by Alecos Papadopoulos
gretl 2024b. Windows 10 64-bit.
Is there a way to impose a non-negativity/positivity constraint on the
gmm command for an estimated parameter *when using the --lbfgs option*?
I am trying to estimate variance(scale) parameters of a distribution.
The theoretical moment condition is
qw^2 + qu^2 = (1/n)sum res^2
(sum of squared residuals estimates the population variance, which is
the sum of two separate variances, so we need both qw>0, qu>0).
I wrote one of the two related orthogonality conditions as
series eq2 = (res2 - (sqrt(qw))^4 - (sqrt(qu))^4 ) *(1/obsn)
(obsn = n) .
/Without/ the --lbfgs option, it appears that the positivity constraint
imposed implicitly through the use of the square root, is respected.
But when I include the --lbfgs option in the gmm command, the estimator
does not seem to be bothered with the square root any more; I get for
example (with --lbfgs)
...
Iteration 2: GMM criterion = 1.45609463344 (steplength = 0.0197114)
Parameters: 0.26238 0.26007
Gradients: -0.87662 1.0848 (norm 5.06e-001)
Iteration 3: GMM criterion = 0.911545264969 (steplength = 13)
Parameters: 0.041548 0.51495
Gradients: -0.019980 1.4100 (norm 6.03e-001)
Iteration 4: GMM criterion = NA (steplength = 0.6875)
Parameters: -0.57965 1.3822
Gradients: -0.019980 1.4100 (norm 9.90e-001)
Iteration 5: GMM criterion = NA (steplength = 0.6875)
Parameters: -1.2008 2.2495
Gradients: -0.019980 1.4100 (norm 1.26e+000)
Iteration 6: GMM criterion = NA (steplength = 0.6875)
Parameters: -1.8220 3.1169
Gradients: -0.019980 1.4100 (norm 1.49e+000)
...
--- FINAL VALUES:
GMM criterion = NA (steplength = 0.6875)
Parameters: -51.518 72.501
Gradients: -0.019980 1.4100 (norm 7.19e+000)
I detect that once one parameter becomes negative, the values of the
gradients do not change anymore, which may say something about the inner
workings of the gmm command with --lbfgs
--
A last-minute thought: in gretl's guide (in chapter 37 for numerical
methods) we read
/<< The primary case for using L-BFGS-B, however, is constrained
optimization: this algorithm supports constraints on the parameters in
the form of minima and/or maxima. In gretl this is implemented by the
function BFGScmax (‘c’ for constrained). The syntax is basically similar
to that of BFGSmax, *except that the first argument must followed by
specification of a “bounds” matrix. >>*/
So, maybe, because when lbfgs is used as an option in gmm we do not
specify this "bounds" matrix, this creates the issue?
But regardless, how can it happen that it takes a negative number, puts
it inside a square root, and doesn't at least abort if not move away,
but keeps on trying negative candidates?
--
Alecos Papadopoulos PhD
Affiliate Researcher
Dpt of Economics, Athens University of Economics and Business
Foundation for Economic and Industrial Research (IOBE)
web: alecospapadopoulos.wordpress.com/
ORCID:0000-0003-2441-4550
2 months, 2 weeks