Dear GRETL users,
I would like to create a diagonal matrix M created from a vector V, that is I have a vector of dimension “n” and I would like to obtain an nXn matrix with the elements of the vector V in the main diagonal of the matrix X
(which contains zeros outside the main diagonal).
This can be done in Stata with the “diag” command or in Eviews with the “@makediagonal” command, but I’m still unable to find the same command in GRETL.
Any suggestion? Thanks in advance.
Best,
Antonio