Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.


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

st: need help with summarizing data


From   Michael Stewart <[email protected]>
To   [email protected]
Subject   st: need help with summarizing data
Date   Sun, 10 Feb 2013 14:54:42 -0500

Hi,
I am trying to find if there is a betterquicker way to do what I am doing

My data is as follows

id	name	dt	procedure
1	xxx	2000	eyesurgery
1	xxxx	2001	eyesurgery
1	xxxx	2002	hernia
1	xxxx	2009	hernia
2	yyy	2010	hernia
2	yyy	2011	cardiacsurgery
2	yyy	2012	eyesurgery
2	yyy	2012	eyesurgery

I am interested in making a excel file or  a stata dataset as follows for

id	name	eyesurgery_2000	eyesurgery_2001.......eyesyrgery2012
1	xxxx		1		1		0
2	yyyy		0		0		2

I use tabulate, copy it into excel file (use import wizard) and then
import into stata
Is there a quicker way??

-- 
Thank you ,
Yours Sincerely,
Mike.
*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/faqs/resources/statalist-faq/
*   http://www.ats.ucla.edu/stat/stata/


© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index