Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: st: saving -proportion- estimates to a .dta or .csv file


From   Richard Williams <[email protected]>
To   [email protected]
Subject   Re: st: saving -proportion- estimates to a .dta or .csv file
Date   Thu, 03 Nov 2011 13:27:19 -0500

At 11:54 AM 11/3/2011, Tim Evans wrote:
I'm trying to save and export the proportion estimates I obtain from using -proportion- into a useable data file, either .csv or .dta.

However having googled this and looked at help resources with -proportion- I don't seem to find what I am after.

How would I return the results from the following code into a data file:

sysuse auto
proportion rep78 , over(foreign)

The estimates are ereturned in e(b). If nothing else you could generate variables equal to those values, cut your data set down to one case, and save under a new name. Something like

sysuse auto
proportion rep78 , over(foreign)
matrix bmat = e(b)
forval j = 1/10 {
gen prop`j' = bmat[1,`j']
}
sum prop*



-------------------------------------------
Richard Williams, Notre Dame Dept of Sociology
OFFICE: (574)631-6668, (574)631-6463
HOME:   (574)289-5227
EMAIL:  [email protected]
WWW:    http://www.nd.edu/~rwilliam

*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/


© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index