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
dyndoc with table, statistic() errorHello Stata Corp. While trying out the new collect and table commands in Stata 17 I discovered a bu…
Mean of frequency from tabHello, i'm using Stata 16. I am trying to calculate the mean of the frequency values (second column…
"Dummy Variable in Regression"Greetings Everyone! Hopefully, you will be fine, I want to check the impact of Family CEOs on firm …
Random sample panel datahello guys! My data consist of unbalanced Panel data with the identifier gvkey_num fyear, fyear con…
sum of the coming 5 years of a variableDear Statalist, I am trying to generate a variable, that is equal to the sum of the coming 5 years …
Subscribe to:
Post Comments (Atom)
0 Response to STATA user - NIS (National Inpatient Sample Database) help
Post a Comment