Using sprintf() in gnuplot command
by Artur T.
Hi all,
I just stumbled over the following trying to add a title to a plot:
<hansl>
set verbose off
nulldata 10
series y = normal()
scalar a = 0.98
gnuplot y --time-series --output=display \
{set title sprintf("Some statistics = %.2f", a);}
<>
As you can see, I tried to apply the handy expression using the
sprintf() function. It does _not_ provike an error, but the value of
`a` is printed as `nan`.
Is sprintf() actually supported? If not, I guess an error should be
thrown.
If it actually is supported, the right value of a should be printed.
Thanks,
Artur
1 day, 4 hours
How can I eradicate a function permanently?
by Paolo Chirico
Dear all,
I have just deleted a package I created for testing. However, the main
(public) function contained in the package seems to still exist, and
gretl prevents me from creating a new one with the same name.
I have even uninstalled gretl and installed the latest version, but the
function still exists even though the package no longer appears in the
package list.
How can I eradicate it permanently?
--
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
--
Questa email è stata esaminata alla ricerca di virus dal software antivirus AVG.
www.avg.com
5 days, 22 hours
Downloadable Function Packages
by Brian Revell
For those Gretl users who rely entirely on the GUI (and may be of an age
now unwilling to learn a new programmimg language}. It would be helpful to
be able to filter the extensive and admirable list of Function Packages by
those that will attach to the GUI (and if so, where)..
Thanks for all you guys do
Brian
*Brian Revell*
6 days, 21 hours
Package updates (May 2025)
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 May 2025,
two packages were updated to a new version:
"DiebMar", by Giulio Palomba (Diebold-Mariano test for predictive accuracy)
"uniFCextensions", by Sven Schreiber (Extensions for univariate forecast
models)
I you'd like to know more on these packages, or simply find out what's
new, the best way is to open the packages page
(https://gretl.sourceforge.net/cgi-bin/gretldata.cgi?opt=SHOW_FUNCS) and
click on the package name or on the [doc] tag if available.
Download and enjoy!
-------------------------------------------------------
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 week, 1 day
gretl4py 0.2 released
by Marcin Błażejowski
Dear Gretl Community,
It’s been almost exactly 11 months since I started a new gretl-related
project: *gretl4py*. Over this time, I’ve spent countless hours writing
and testing the module, learning a lot about the inner workings of
*libgretl*, and rediscovering my long-dormant C++ skills. (After 20
years away from the language, I found myself in a new, much better
world! 😄)
Today, I’m happy to announce the release of *version 0.2*, now available
via PyPI for the three major operating systems: Windows, macOS, and
Linux. This means you can install it simply by running:
/python -m pip install gretl4py/
Please note that the official PDF documentation is slightly outdated, as
it mostly refers to version 0.1. For a better starting point, see the
simplified documentation at:
🔗 https://pypi.org/project/gretl4py/
You can also look at example scripts here:
🔗 https://sourceforge.net/p/gretl/gretl4py/ci/v0.2/tree/demo/
🔗 https://sourceforge.net/p/gretl/gretl4py/ci/v0.2/tree/gretl/examples/
At this point, I’d like to thank everyone who has contributed in some
way to the gretl4py project—especially:
*
*Allin Cottrell*, for helping me integrate libgretl functionality
into the bindings,
*
*Riccardo (Jack) Lucchetti*, for testing and inspiring ideas about
what could be added and how,
*
and *Federico Fiorani*, for his contributions to the first version
of the package.
Of course, any remaining bugs are my responsibility. If you find any, or
have questions about the package, don’t hesitate to speak up!
With best regards,
Marcin
1 week, 2 days
Panel-data sample manipulation-transformation
by Alecos Papadopoulos
I went through the available panel-data functions in gretl and what I
describe below does not appear to be implemented.
I also have difficulty imagining how I could do it through a
user-defined function because I do not understand whether, and how, the
variant of panel-data structure (stacked v_1, stacked v_2, or based on
variables etc), may need to be taken into account or not.
Also, how the case of an unbalanced panel could be handled (which is
indeed my case - and as Bruce E. Hansen writes "unbalanced panels
complicate computer programming"...)
I would appreciate any suggestions.
Let a balanced panel data sample {y_{it}, x_{it}}, i=1,...,N, t=1,...,T
I want to transform the sample by subtracting from each data point the
related group-mean, i.e. the mean value of the same (same by nature)
variable across the dimension i=1,...,N
Namely to perform the operation
z_{it} = x_{it} (-) (1/N)*sum_{i=1}^N [x{it}],
i.e.
z_{it} = x_{it} (-) (1/N)*[x_{1t} + x_{2t} + ... + x_{Nt}]
and the same for the "y" variable, and any other variable in the sample.
Ideally, this has to work for both balanced and unbalanced panels., i.e.
when the "N" may differ in each t time period.
--
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
1 week, 4 days
gretl 2025b released
by Allin Cottrell
Please see https://gretl.sourceforge.net/
Windows users: Note that there's now an ARM64 package available:
https://gretl.sourceforge.net/win32/
The changes:
2025-06-05 version 2025b
- gretlcli: add --no-plots option to suppress plots
- "add" command: add an --auto option for forward stepwise
regession via QR algorithm
- new function thresh() for hard and soft thresholding
- new function pxmean() for cross-sectional panel mean
- "gnuplot" command: generalize the --dummy functionality
for factorized plots; update and improve the help text
- curl() function: add an option to skip downloading of
the body of the requested URL
- cnameset() and rnameset(): these functions now flag a
warning if the number of names given does not match the
relevant matrix dimension; this will become an error in
a future release
- Fix bug: correct the disturbance smoother for the de Jong
variant of the Kalman filter; also fix a memory leak
- Fix bug: poor handling of vector added to a bundle "as a
series" when the dataset is sub-sampled
- Fix minor bug: bad initialization in legacy Kalman code
- internals: make gretl_get_data() support more data file
formats; several small fixes to quell errors and warnings
from gcc 15 and clang 20; add some code to facilitate new
gretl4py functionality
- GUI: fix the action of the "Stop" button when running a
packaged function from the function-call dialog
- GUI: relax the restrictions on the number of lags that
can be selected in the model specification dialog
- GUI: rejig the main-window "Add" menu and also the
pop-up context menu for single series
- regls addon: miscellaneous small fixes and tweaks
- cleanup: delete the long-deprecated eigengen() function
- Windows: add a gretl package for Windows on ARM64
- macOS: drop the "Calculator" button in the main window
toolbar, since this stopped working as a result of
recent security updates; also drop usage of otool by
libgretl_init()
- macOS: fix for launching gretl by double-clicking on a
gretl script or data file
- update translatable strings
--
Allin Cottrell
Professor Emeritus of Economics
Wake Forest University, NC
1 week, 5 days