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

st: generating simple index


From   "Vimalanand S. Prabhu" <prabhu@unc.edu>
To   <statalist@hsphsun2.harvard.edu>
Subject   st: generating simple index
Date   Thu, 25 Sep 2003 11:32:41 -0400

Dear All,

I have a household data set with varying number of respondents interviewed
from a each household, like the following:

person hhid Age
1	1	12
2	2	25
3	2	52
4	3	62
5	4	77
6	4 	34
7 	4	32
8	4	23
9	5	18
10	5	13
:
:
:

I wanted to convert the data from rows to columns...ie...I wanted it in a
form as follows:

hhid personid1 	age1 personid2 	age2 personid3 age3 ....
1	1		12
2	2		25	3		52
3	4		62
4	5		77	6		34	.......
5	10		13

Kindly advise.

I would also like to know about some references for advanced programming in
Stata.

Thanks,


Prabhu




*
*   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–2021 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index