Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down at the end of May, and its replacement, statalist.org is already up and running.


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

st: RE: Importing & managing multiple row of data for one unique ID


From   "Nick Cox" <n.j.cox@durham.ac.uk>
To   <statalist@hsphsun2.harvard.edu>
Subject   st: RE: Importing & managing multiple row of data for one unique ID
Date   Mon, 7 Jun 2010 20:04:40 +0100

Check out the help for -reshape-. 

Nick 
n.j.cox@durham.ac.uk 

Jumin Kim


I have a question about how to manage data with multiple rows of data for one unique ID and to manipulate it so that the 2nd, 3rd, etc. rows for that unique ID become additional columns for one unique ID row.  Also, each ID can have either 2 or 10 additional rows to transform as additional columns..  I have some sample data below.  Based on this data, I would like to add additional 6 columns for ID# 1048, each row becoming an additional column as fall2008, spring2009, etc. depending on their "Enrollment Begin" and "Enrollment End" dates.  Any insight would be greatly appreciated!

Hope this makes sense.  Thank you in advance for all your help and thoughts.
Thank you!! jumin

Related Student	College Name	College State 2-year/4-year	Public / Private	Enrollment Begin	Enrollment End	Enrollment Status	Graduated Graduation Date  Degree Title  Major College Sequence	Enrollment Begin Term
1048	UNIVERSITY OF CALIFORNIA-SAN DIEGO	CA		4		Public		20100104		20100320		F			N											2010SPR
1048	UNIVERSITY OF CALIFORNIA-SAN DIEGO	CA		4		Public		20090924		20091212		F			N											2009FALL
1048	UNIVERSITY OF CALIFORNIA-SAN DIEGO	CA		4		Public		20090330		20090612		F			N											2009SPR
1048	UNIVERSITY OF CALIFORNIA-SAN DIEGO	CA		4		Public		20090105		20090321		F			N											2009SPR
1048	UNIVERSITY OF CALIFORNIA-SAN DIEGO	CA		4		Public		20080925		20081213		H			N											2008FALL
1048	SAN DIEGO MESA COLLEGE			CA		2		Public		20080825		20081217		N											2			2008FALL
1048	UNIVERSITY OF CALIFORNIA-SAN DIEGO	CA		4		Public		20080609		20080919		F			N								1			2008SUM
4073	CALIFORNIA STATE UNIVERSITY - NORTHRIDGE	CA	4		Public		20100119		20100524		F			N											2010SPR
4073	CALIFORNIA STATE UNIVERSITY - NORTHRIDGE	CA	4		Public		20090824		20091223		F			N								1			2009FALL


*
*   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   |   Site index