Hello everyone,
I am dealing with a large national database (TQIP) which has a series of variables (ICD and AIS codes) stored in long datasets such as:
inc_key icdprocedurecode icdprocedurecode_biu icdprocedureversion proceduremins proceduredays
1.800e+11 BW28ZZZ ICD10 145 1
1.800e+11 B030ZZZ ICD10 3149 3
1.800e+11 BR29ZZZ ICD10 165 1
1.800e+11 BW251ZZ ICD10 151 1
1.800e+11 BR20ZZZ ICD10 161 1
1.800e+11 BR27ZZZ ICD10 164 1
1.800e+11 BR29ZZZ ICD10 10 1
1.900e+11 BW28ZZZ ICD10 9 1
1.900e+11 BR20ZZZ ICD10 9 1
1.900e+11 BW25YZZ ICD10 10 1
1.900e+11 BW40ZZZ ICD10 5 1
1.900e+11 BR27ZZZ ICD10 10 1
1.900e+11 0HQ0XZZ ICD10 40 1
1.900e+11 BW28ZZZ ICD10 30 1
1.900e+11 B24CZZZ ICD10 1
Essentially, I have one common variable i (inc_key) to use in reshape but there is no unique j variable to use with reshape such as year or numbering of any kind since the order of the ICD 10 codes does not matter for this analysis-- I just need them separated and categorized into a single inc_key number for each (so icdcode1, icdcode2, etc. for each unique inc_key number), but I'm not sure how to do this.
I hope this wasn't confusing.
Related Posts with Reshaping long to wide problems
Plotting using survey weightsI have responses of survey on students and the data needed to be weighted based on the faculty of th…
Short Deadline: Help with xtreg regressionHello, I am facing a problem with my panel data which has "loans disbursed" as a panel variable and…
Omitted "Treatment" variable in DiD fixed panel regressionOmitted "Treatment" variable in DiD fixed panel regression 01 May 2021, 08:30 Hi, I'm currently stu…
Stata 17 Bookmarks Not Working and No Navigation ControlAfter creating bookmarks in Stata 17.0, I am not provided a Navigation Control by which I can naviga…
Quadratic moments condition in GMMHi all, I am trying to evaluate a framework which requires me to input a quadratic GMM condition. I…
Subscribe to:
Post Comments (Atom)
0 Response to Reshaping long to wide problems
Post a Comment