I am a new user of stata. I have a problem of exporting the
covariance-variance of estimate (after regress) to a external file with
extension, such as csv (or any data format with comma as seperation). The
command 'outsheet' is not working for this. Can someone tell me how to do
this? Thank you!
To copy a the columns of variance-covariance matrix to a set of variables,
use the -svmat- command on the matrix -e(V)- created by an estimation
command. The new variables can then be output using -outsheet- like any
other variables. See -[P] matrix mkmat- in the Stata programming manual.
and this should create a set of variables -vvector1-, -vvector2- and
-vvector3-, which are output to a file -vv1.csv-.
If James wants to output estimates and/or confidence intervals and/or
P-values to a spreadsheet, rather than a covariance matrix, then he might
like to find out about the -parmest- package, which saves estimation output
as a Stata data set. In Web-aware Stata, type -ssc describe parmest- to
find out more, and type -ssc install parmest- to install the -parmest-
package over the Web from the SSC site.
I hope this helps.
Lecturer in Medical Statistics
Department of Public Health Sciences
King's College London
5th Floor, Capital House
42 Weston Street
London SE1 3QD
Tel: 020 7848 6648 International +44 20 7848 6648
Fax: 020 7848 6620 International +44 20 7848 6620
or 020 7848 6605 International +44 20 7848 6605
Opinions expressed are those of the author, not the institution.