Statalist


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

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


From   Ekaterina Hertog <[email protected]>
To   "[email protected]" <[email protected]>
Subject   st: Is it possible to save a scalar saved after -summarize- as a variable?
Date   Mon, 02 Nov 2009 14:46:50 +0000

Dear all,
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

am I correct in assuming that r(sum) scalar saves the total number of ones by each method in this case? And if yes is it possible to generate a variable that would equal this saved r(sum) scalar by each method?
I would be very grateful for advice,
Warm regards,
Ekaterina
*
*   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