How to write a series of matrices
How to write a series of matrices
I have been using the example program garchmvdcc2 and would like to be able to write to an external file the series of q matrices. Have tried all combinations of write/print/copy/display I can think of but the required syntax has defeated me. I'm sure there must be a simple way to export a "series[symm]", probably by converting it into a series of vectors (or vector of series), so the n x n matrix at observation t becomes a row vector at time t having n*(n-1) columns. But I couldn't figure out how to convert the sequence of q matrices into a sequence of vectors. There may just be a simple direct way to export a "series[symm]" too, and that would be fine. Any help much appreciated. Thank you.
Re: How to write a series of matrices
You have to copy it into a SYMM[SERIES]. The following will do that in this case:
dec symm[series] copyq(n,n)
do time=%regstart(),%regend()
compute %pt(copyq,time,q(time))
end do time
You can then do a COPY instruction on COPYQ.
dec symm[series] copyq(n,n)
do time=%regstart(),%regend()
compute %pt(copyq,time,q(time))
end do time
You can then do a COPY instruction on COPYQ.
Re: How to write a series of matrices
Thank you. Perfect solution.