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

Re: st: counting


From   Gary Longton <glongton@fhcrc.org>
To   statalist@hsphsun2.harvard.edu
Subject   Re: st: counting
Date   Thu, 17 Jun 2004 13:29:11 -0700

This question looks virtually identical to one posted 2 days ago by jdubas. See the replies to that message to see if they apply (msg subject: data manipulation)

- Gary

McCollum,Kelly wrote:


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