Assumming that wagefemal>0 & income is always nonmissing.
I suggest to try:
bysort hid: egen income2=min(income)
R.
----- Original Message -----
From: <[email protected]>
To: <[email protected]>
Sent: Wednesday, January 03, 2007 12:45 PM
Subject: st: replace value for all person
I wish you an happy new year.
I have a question about calculated a new variable that have the same
value for all person in the house.
I have a datset where the variables are: hid(ident house),
pid(personal ident), houseincome(income in the house), wagefemel(wage
of wife)
and income( houseincome - wagefemel)
hid pid houseincome wagefemal income
1 1 100 0 100
1 2 100 10 90
1 3 100 0 100
I have need that the house income is the house income minus wagefemal
for ech pid in the same house(hid) or 90.
I created wagefemal by hid, but not change.
thanks a lot for your help.
C.N.
*
* For searches and help try:
* http://www.stata.com/support/faqs/res/findit.html
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/
*
* For searches and help try:
* http://www.stata.com/support/faqs/res/findit.html
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/