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]

st: Aggregating information over several records


From   "Palan, Stefan ([email protected])" <[email protected]>
To   "[email protected]" <[email protected]>
Subject   st: Aggregating information over several records
Date   Mon, 22 Nov 2010 08:08:48 +0100

Hi everybody,

I have a dataset where every row corresponds to one trade in a market and contains the variables market (which market the trade was in), period (which period the trade was in), price, seller (the id of the selling subject) and buyer (the id of the buying subject). Trades are always for one unit of the good and each subject can both buy and sell.

What I would like to do is aggregate information across trades, such that I start with the initial endowment of cash and the traded goods for each subject and get e.g. the total money earned from selling goods/paid for buying goods for each subject in each period/market. Unfortunately, I don't know how to efficiently add up the information in this way, and I also don't quite know how to deal with the fact that the same subject may in one trade appear as a seller and in the next may appear as a buyer.

Cheers,
Stefan.

*
*   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