I am trying to get get the study population with certain cancer diagnoses (ICD10 codes) admitted as one of the diagnoses out of 30-40 Dx given in NIS. What code should I use? I have used this following, but it hasn't worked. Note abc/xyz I am just using as an example here for ICD codes range, i.e., 10-20
gen cancer = 0
forv i=1/30 {
replace cancer = 1 if I10_DX`i'>= "abc" & I10_DX`i'<="xyz".}
Can someone help, please?
Related Posts with STATA user - NIS (National Inpatient Sample Database) help
Panel DataHi, I am using panel data with the wave variable ranging from 1 to 10 however i would like to focus…
Testing stability of reggression discontinuity model (TED)Hello Statalisters, I need your valuable advice. Having applied in my analysis regression discontin…
matching single county with unique congressional districtAccording to us house election data a single county for a specific state belongs to multiple congres…
How can I check if a string has repeated words?I know the moss package is related to this but I cannot make it work yet(one similar post can be fou…
forvalue loop for discontinuous variableHow I can use a forvalue loop over the variable whose values are not sequentially continuous? I want…
Subscribe to:
Post Comments (Atom)
0 Response to STATA user - NIS (National Inpatient Sample Database) help
Post a Comment