Bookmark and Share

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

[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 <>
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:  Richard.A.Williams.5@ND.Edu

*   For searches and help try:

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