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

st: Reshaping Data Set


From   "Ueda, Takeshi (FAORAP)" <[email protected]>
To   [email protected]
Subject   st: Reshaping Data Set
Date   Wed, 02 Mar 2005 16:12:18 +0700

Title: Reshaping Data Set

I want to reshape Data Set 1 to Data Set 2.  Please advise me how I can do it in an efficient way.  The real data set to be dealt with contains over 60,000 HHs and over 200 Codes.  Thank you very much.

T. Ueda

<Data Set 1>
HH      Code    Income
1       1       1000   
        2       500
        3       100   
2       1       900
        4       300
3       1       800
        2       300
        3       500
        4       400

<Data Set 2>
HH      Code1   Code2   Code3   Code4
1       1000    500     100     0
2       900     0       0       300
3       800     300     500     400




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