Statalist


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

Re: st: Is it possible to save a scalar saved after -summarize- as a variable?


From   Maarten buis <[email protected]>
To   [email protected]
Subject   Re: st: Is it possible to save a scalar saved after -summarize- as a variable?
Date   Mon, 2 Nov 2009 07:14:58 -0800 (PST)

--- On Mon, 2/11/09, Ekaterina Hertog wrote:
> I have data  on people using different methods to ask
> people on a date (e.g. via internet, at a party etc) and I
> would like to see if some methods on average lead to greater
> number of acceptancies than others.
> For that i need to create a variable which summarizes a
> number of acceptances by method. I created a variable accept
> which equals 1 if a date proposal is accepted and 0 if it is
> unsuccessful.
> I then run the following command:
> 
> bysort method: su accept

I am assuming that you want to create a new dataset containing
those means, e.g. for graphing. One way of doing that is shown 
below, but there are many others.

*--------- begin example -------------
sysuse auto, clear
table rep78, c(mean foreign) replace 
list
*---------- end example --------------

Hope this helps,
Maarten

--------------------------
Maarten L. Buis
Institut fuer Soziologie
Universitaet Tuebingen
Wilhelmstrasse 36
72074 Tuebingen
Germany

http://www.maartenbuis.nl
--------------------------


      

*
*   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–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index