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
XTHREG and Clustered Standard Error (with few Clusters)Hello everyone, I run a threshold regression following the Hansen(1999) paper and the code from Wan…
Twoway bar with 2 y-axesHi all, I'm trying to create a bar graph that shows how the numbers of procedures etc. required var…
Store result from calculation to a matrix?Hi all! I'm trying to compute the jackknife variance estimate using the formula from Hansen's "Econo…
How to implement -xtdpdml- with interaction terms?Hi Statalist, In my paper I validate a theoretical proposition through the following FE regression:…
How to save a matrix into stata data.Hello, I have the following dataset and I am using fect to estimate the ATT via interactive fixed ef…
Subscribe to:
Post Comments (Atom)
0 Response to STATA user - NIS (National Inpatient Sample Database) help
Post a Comment