Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: RE: How ?


From   "Maarten Buis" <[email protected]>
To   <[email protected]>
Subject   st: RE: How ?
Date   Fri, 9 Dec 2005 15:27:20 +0100

Fernando:

Please use informative titles for your posts. 

Here is an example of how you could achieve what you want:

*----------------example-------------
sysuse auto, clear
sort rep78
by rep78: egen mean = mean(price)
list mean
*--------------end example----------------

HTH,
Maarten

-----------------------------------------
Maarten L. Buis
Department of Social Research Methodology 
Vrije Universiteit Amsterdam 
Boelelaan 1081 
1081 HV Amsterdam 
The Netherlands

visiting adress:
Buitenveldertselaan 3 (Metropolitan), room Z214 

+31 20 5986715

http://home.fsw.vu.nl/m.buis/
-----------------------------------------

-----Original Message-----
From: [email protected] [mailto:[email protected]]On Behalf Of Fernando Augusto Proietti
Sent: vrijdag 9 december 2005 15:25
To: [email protected]
Subject: st: How ?

Dear all,

I have a data set , from a population based study, including 20,000
participants.

These 20,000 participants are nested in about 5,000 families.
All family members (living in the same house)  are included in the
study. I want to create a new variable, income per capita.

The data looks like that:

ID                Income (monthly)

9001             0,0000
9001             5,0000
9001             8,0000

9003             5,0000
9003             6,0000
9003             0,0000
9003             2,0000

The 9001 are member (3) of the same family, as well as the 9003 (4
members) and so on.

Thanks in advance, fernando

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



© Copyright 1996–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index