Christa, Nick pointed to -svmat- as part of the following sequence
. preserve
. drop _all
. svmat <matname>
. save <filename>
. restore
The -drop _all- ensures that none of the variables in memory are included in
your eventual 'matrix data', so all you need to do is select a filename that
is different that the name of data file, e.g.
. use "C:\Stata\auto.dta"
. mat A = [ 1, 2 ,3 \ 4, 5, 6 \ 7, 8, 9 ]
. svmat A
. list
A1 A2 A3
1. 1 2 3
2. 4 5 6
3. 7 8 9
. save mymatrix
Or perhaps I misunderstood the question.
Patrick Joly
[email protected]
[email protected]
-----Original Message-----
From: Christa Scholtz [mailto:[email protected]]
Sent: Thursday, September 12, 2002 11:34 AM
To: [email protected]
Subject: Re: st: svmat to different datasheet
I tried that, but couldn't figure out how to save the matrix as a .dta
file independent from the dataset from which it was derived.
Christa
*
* For searches and help try:
* http://www.stata.com/support/faqs/res/findit.html
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/