hi - the data I've downloaded had a bunch of dummy variables that were coded as essentially yes=2 and no=1. I tried to fix this by creating a new dataset and changing them to 1=yes and 0=no. This is my code below: data dummies; set IPUMS.usa_00003_f; if HCOVPRIV=2 then private=1; else private=0; if HCOVPUB=2 then public=1; else public=0; if HINSCAID=2 then medicaid=1; else medicaid=0; if HINSCARE=2 then medicare=1; else medicare=0; if HINSEMP=2 then employer=1; else employer=0; if HINSPUR=2 then direct=1; else direct=0; if HINSTRI=2 then tricare=1; else tricare=0; if HINSVA=2 then va=1; else va=0; proc freq data=dummies; tables private public medicaid medicare employer direct tricare va / out=coverage; by year; run; proc means; run; I also ran a proc freq prior to this new dataset being made and it ran perfectly fine but now that I've made this new dataset, some variables are missing (age, sex, race, year). I have no idea why those variables went away and now my new dummy variables are all showing up as a value of 0, but there are 430 observations so I know that they are there but just all showing up as zero. Can someone please let me know what I've done wrong?
... View more