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

st: counting


From   "McCollum,Kelly" <[email protected]>
To   "'[email protected]'" <[email protected]>
Subject   st: counting
Date   Thu, 17 Jun 2004 16:01:48 -0400

Hi Statalisters,

I have a dataset that was given to me that looks like this:

ID	TRIM	PLASMA	URINE		HS1		HS2		HS3		HS4
1	1	1
1	1			1
1	1					1
1	1							1
1	1									1
1	1											1
2	1	1
2	1			1
2	1					1
2	1							1
2	1									1
2	1											1
1	2	1
1	2			1
1	2					1
1	2							1
1	2									1
1	2											1
2	2	1
2	2			1
2	2					1
2	2							1
2	2									1
2	2											1
.	.
.	.
.	.


I tried to reshape the data to the wide form using the reshape command but cannot seem to do this because I do not have a unique value for each ID and TRIM.  I ultimately want one row for each ID and trimester:

ID	TRIM	PLASMA	URINE		HS1		HS2		HS3		HS4
1	1	1		1		1		1		1		1
1	2	1		1		1		1		1	      1
2	1	1		1		1		1		1		1
2	2	1		1		1		1		1	      1				
Any suggestions?
Kelly
 	
*
*   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