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: Manipulations within a panel data set.


From   George Shoukry <[email protected]>
To   [email protected]
Subject   st: Manipulations within a panel data set.
Date   Fri, 26 Jul 2013 21:48:04 -0500

Hello,

Say I have a panel data set with n individuals and income is one of
the regressors. I have two indices: i,j in {1,...,n} and I would like
to set the income of person i to be the income of person i divided by
the income of person j, and leave everything else unchanged. Is there
a simple way to do that?

Also, I will have to do this for all individuals, but they will all be
divided by different j's. If I have a list of the j's for i in
{1,...,n}, is there a quick way to do what I described above in Stata
without a for loop?

Thanks!
*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/faqs/resources/statalist-faq/
*   http://www.ats.ucla.edu/stat/stata/


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