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
10 months, 1 week
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
10 months, 1 week