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: Restructuring of data


From   Mats Martinell <[email protected]>
To   [email protected]
Subject   st: Restructuring of data
Date   Wed, 26 Jan 2011 20:32:25 +0100

Dear Statalist,
In swedish healthcare we are compensated by diagnose of the patient treated. The the economic compensation is different if the diagnose is primary, secondary, tertiary an so forth. I want to study the incidence of certain diagnoses and for that purpose I need to restructure "diagose1, diagnose2, diagnose3 and diagnose4" into one variable (see below). The catch is that I would like to only have one diagnose per row without changing the other variables (i.e. more rows need to bee created). All help is highly appreciated!
	
variable name		type	format		
					
date				int	%8.0g		
source				str3	%9s		
pin_anonym			int   %8.0g		
medenh				str20 %20s		
medreg				str20%20s		
antalbesk			int	%8.0g		
diagnose1			str5	%9s		
diagnose2			str8	%9s		
diagnose3			str8	%9s		
diagnose4			str6	%9s		     		
sex					byte	%8.0g		
birth_year			int	%ty		
incl_year			int	%ty		
death_year			int	%ty		
incl_date			float	%td..		
death_date			float	%td..		

Mats Martinell, Ph.D. student
Dept of Public Health and Caring Sciences
Uppsala university






*
*   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–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index