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
Funnelplot for proportions after "metaprop"Dear, thank you in advance for the time you dedicate to me. I'm doing an extensive meta-analysis of…
How to find out whether household has faced a health shock any time during the past rounds?Hi statalist, Please consider the following example data Code: * Example generated by -dataex-. T…
How to do -xthreg with intercept regimeHi All, I'm trying to estimate Panel Threshold Model using xthreg, i want to include different inte…
Spearman Rank CorrelationThe following code calculates average monthly cross sectional Pearson Product moment Correlations. N…
Calculate the mean of simulations by groups with panel dataHello everyone, My dataset contains: - mcruns (50 Monte Carlo simulations) - lgacode (50001 to 501…
Subscribe to:
Post Comments (Atom)
0 Response to STATA user - NIS (National Inpatient Sample Database) help
Post a Comment