On Tue, 25 Dec 2018, Allin Cottrell wrote:
On Tue, 25 Dec 2018, Riccardo (Jack) Lucchetti wrote:
> Dear all (and merry Xmas to you),
>
> we don't have 3-D arrays like Matlab has, but we do have matrix arrays,
> which you can more or less use to the same effect. I thought it would be
> nice to have a function (provisionally called coresample(), as in those
> holes you drill through the ground) that fills a matrix with selected
> elements from a matrix array. Example script attached.
>
> My questions are:
>
> (i) is this useful enough to be made a standard function, or should we just
> mention this kind of technique in the cheat sheet chapter (if at all?)
It's certainly cute. I'm not sure about its usefulness -- do you have
applications in mind?
One area could be the SVAR package: we currently store large matrices that
would be (perhaps) better organised as matrix arrays. For example, one
could store IRFS as an h-array of (n x n) matrices, or as an n-array of (h
x n) matrices (where h is the horizon and n is the number of variables in
the system). At that point, it'd just make sense to have functions to
extract the inforamtion you want in a clean and efficient way.
-------------------------------------------------------
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
-------------------------------------------------------