On Sat, 24 Nov 2018, Laura Magazzini wrote:
Hi!
I am running a system GMM estimator for dynamic panel data models.
I need to perform some computations after the second step estimation
than involve the matrix of instruments, the matrix of regressors (both
differenced and level), and the weighting matrix used in computation of
the system GMM (obtained from first step estimates).
Is it possible to recover these information after the dpanel command?
In normal circumstances, the info you need is not useful to the user and
I'd avoid storing it into the $model bundle because typically these are
very large matrices.
On the other hand, it would be very time consuming for the user who needs
those matrices to reconstruct them in hansl, so Laura's request is
perfectly legitimate IMO. So, I'm attaching a patch which introduces an
option to the dpanel command named --keep-extra. After applying the patch,
if you run the dpanel command with the --keep-extra option, you get two
new elements in the $model bundle, named "Z" (the instrument matrix,
transposed) and "A" (the weights).
I haven't pushed this to git yet because I this this is a rather sensitive
change and I'd like Allin to approve it (especially because there's a fair
chance I've f****d up memory allocation, as I regularly do when I write C
code).
-------------------------------------------------------
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
-------------------------------------------------------