follow-up question for Erin Meyer per NHIS veteran status variables 2007-2014


Several days ago I asked about how to combine veteran status in the 2007-2014 NHIS by combining armfev (2011-2014) and hondscg (2007-2010). Erin Meyer wrote back: " 0It is possible to merge these variables in the statistical package of your choice. One way this can be accomplished is to create a new variable such as VETSTAT. Then you can write syntax indicating that in years 2007-2010 HONDSCG=VETSTAT, and in years 2011-2014 ARMFEV=VETSTAT. This will combine the two variables into one veteran status variable."

But how would you do this in the on-line analysis system? As far as I can tell, the recode option cannot handle this.



I’m sorry you have been having difficulties creating your veteran status variable with the online analysis system. I was able to successfully merge ARMFEV and HONDSCG into one variable, which I named veteran2. You can view this variable to see how I recoded it by navigating to the online analysis system, clicking Create Variables, and then List Created Variables.

Based on the methods we have discussed and the dates the variables were created, I am fairly certain the four variables beginning with VETERAN_STATUS were ones you were working on. If you view veteran2 you will see that I used your recoded variables for the merge. Veteran2 is nearly identical to how VETERAN_STATUS_2010_to_2014 was recoded, except instead of using . to indicate missing data, I used double asterisks. While . will look at all codes that have been specifically defined as missing-data values, ** will match ANY code that has not yet been translated to output, including all missing-data codes. Making this change successfully hooks the two veteran status measures together.

In the end, you nearly had it, and I hope it helps to know that your thought process for the recode was sound. If you have any more questions, don’t hesitate to ask.