Statalist


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

st: Panel data. Multiple variables generation.


From   Laia Cirera i Crivillé <[email protected]>
To   <[email protected]>
Subject   st: Panel data. Multiple variables generation.
Date   Fri, 18 Dec 2009 19:49:45 +0100

Good afternoon,


I am working with a panel data set, which contains data on bilateral trade flows for 103 countries and for 9 periods of time (t), where (i) are exporting countries and (j) are importing countries .

For each pair of trading countries (ij), and for each period of time (t), I have the variable Yijt. I need to create a new variable (Xit), which, for each case where country (i) is exporting and for each period of time (t), will add Yijt terms up. For example, if country i=1 and t=1 (X11), to obtain X11, I take each case of period t=1 where country 1 is exporting (i=1), and add all Yijt terms up. If country i=2 and and t=1 (X12), I take each case of period t=1 where country 2 is exporting (i=2), and add all Yijt terms up. So Xit will vary by exporting country(i) and period of time(t), but will be the same across bilateral pair of countries (ij) which have the same exporter country (i) and period of time (t).

Do you know which command I should use?

Thanks a lot.

Laia 		 	   		  
_________________________________________________________________
¡Ya está aquí Windows Live Spaces! Ahora podrás crear fácilmente tu propio sitio Web.
http://spaces.live.com/signup.aspx
*
*   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