Statalist


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

st: Reshape


From   "Solorzano Mosquera, Jenniffer" <JENNIFFERS@Contractual.iadb.org>
To   <statalist@hsphsun2.harvard.edu>
Subject   st: Reshape
Date   Thu, 16 Apr 2009 08:41:03 -0400

Hi everybody
How can I reshape this database?

Caseid v001 v002 midx_01 midx_02 midx_03 midx_04 midx_05 midx_06 midx_07
midx_08 midx_09 vx_01 vx_02 vx_03 vx_04 vx_05 vx_06 vx_07 vx_08 vx_09 

130456  34   yes    1	   0       0       .       .       .      .
.       .       2     1     1     .      .     .     .      .      .
123423  21   yes    1      1       1       0       .       .      .
.       .       
231465  54   yes 
345677  65   no

I want

Caseid     v001    v002      midx   vx

130456	34      yes       1      2
130456	34	  yes       0      1
130456	34	  yes       0      1
130456	34	  yes       .      .
130456	34	  yes       .      .
130456	34	  yes       .
130456	34	  yes       .
130456	34	  yes       .
130456	34	  yes       .
123423	21	  yes       1
123423	21      yes       1
123423	21      yes       1      
123423	21	  yes       0
123423	21      yes		.
123423	21      yes       .
123423	21
123423	21
123423      21
.
.
.
345677      65      no
345677      65      no


Each caseid has one to 20 cases, but I'm trying to use the whole
information for the total of the 20 cases instead each caseid. Trying to
calculate child mortality rate by direct method..

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