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
Implied Cost of Equity, mm_root function skips the results of some observationsHi There, I have used the following codes to calculate the implied cost of equity. While the code c…
Losing Precision with ASEC ID ValuesHi Statalisters, I'm currently working with the 2019 CPS ASEC, trying to match individual responden…
Decomposing regression into within and between effectsConsider the following baseline model: yijk = beta * xijk + errorijk where i indicates a child, j i…
Flexible parametric modelling, models do not convergeHi, I’m using the -stpm2- command to generate a flexible parametric model (relative survival, >1…
f test following reghdfe for joint significance of individual fixed effectsHi all, I'd like to run a f-test to test joint significance of each fixed effects. For example, I'd…
Subscribe to:
Post Comments (Atom)
0 Response to Reshaping long to wide problems
Post a Comment