Statalist


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

st: RE: How do I create variables summarizing for each individual properties of other individuals with same covariates value?


From   "Nick Cox" <[email protected]>
To   <[email protected]>
Subject   st: RE: How do I create variables summarizing for each individual properties of other individuals with same covariates value?
Date   Thu, 5 Nov 2009 11:44:19 -0000

Please see 

How do I create variables summarizing for each individual properties of
the other members of a group?
http://www.stata.com/support/faqs/data/members.html

Nick 
[email protected] 

Vincenzo Carrieri

I have this kind of problem.

given this 5 variables:

education, age, region, activity, income
 I would like to generate a variable that is the mean of income across
people with:
1) same education
 2) the same age group, within 5 years younger or older than the
individual concerned
3) same region
4) same activity

Then I would like to assign the mean calculated to the person that has
the same covariates value. I think that the problems could be solved
with some stata commands as foreach, but I am not able to set the
problem in stata.


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