Thanks once again to Kit Baum, a new version of the xsvmat package is now available for download from SSC. In Stata, use the ssc command to do this, or adoupdate if you already have an old version of xsvmat.

The xsvmat package is described as below on my website. The new version has been updated to Stata Version 16, and has a frame() option to allow the user to save the output datast (or resultsset) in a data frame.

Users of older versions of Stata can still download old versions of xsvmat, compatible with their Stata versions, by typing, in Stata,

net from http://www.rogernewsonresources.org.uk/

and selecting a Stata version in whch to download xsvmat.

---------------------------------------------------------------------------
package xsvmat from http://www.rogernewsonresources.org.uk/stata16
---------------------------------------------------------------------------

TITLE
xsvmat: Convert a matrix to variables in an output dataset

DESCRIPTION/AUTHOR(S)
xsvmat is an extended version of svmat. It creates an output
dataset (or resultsset), with one observation per row of either an
existing matrix or the result of a matrix expression, and data on
the values of the column entries in that row, and, optionally,
extra variables specified by the user. The output dataset created
by xsvmat may be listed to the Stata log, or saved to a data
frame, or saved to a disk file, or written to the memory
(overwriting any pre-existing dataset).

Author: Roger Newson
Distribution-Date: 28december2013
Stata-Version: 16

INSTALLATION FILES (click here to install)
xsvmat.ado
xsvmat.sthlp
---------------------------------------------------------------------------
(click here to return to the previous screen)