Insurance how to define each

I’m finding that the insurance identified from HINSCAID, HINSCARE variables are very low especially HINSCARE. Is HINSCARE for medicare ffs?

If I want to categorize commercial, medicaid, medicare, other (military, VA, tricare, etc) and none, what’s the best way to do so. Currently have

if row['HINSPUR'] == 2: #direct insurance
    return 'COMMERCIAL'
elif row['HINSEMP'] == 2: #employer
    return 'COMMERCIAL'
elif row['HINSCAID'] == 2:
    return 'MEDICAID'
elif row['HINSCARE'] == 2:
    return 'MEDICARE' 
elif row['HINSTRI'] == 2 or row['HINSVA'] == 2 or row['HINSIHS'] == 2:
    return 'OTHER'
else:
    return 'NONE'

I am noticing that you do not specify a weight variable anywhere in the code that you provided. To adjust for mixed geographic sampling rates, nonresponse adjustments, and individual sampling probabilities in the American Community Survey (more information of the ACS sample design), it is necessary to weight your estimates. PERWT is the correct weight for person-level estimates. We offer data training exercises with sample R code for implementing weights: exercise one and exercise two.

You might also be interested in our online analysis tool, which allows researchers to run simple analyses without needing to download the data themselves. I was able to run the analysis you mention using the tool by tabulating HINSCARE for the 2023 ACS with PERWT selected as my weight. The estimate that I got was that 18.9% of the US resident population was covered by Medicare, which replicates the statistic in the Health Insurance Coverage in the United States: 2023 report. Note that while IPUMS does not provide code review, we do answer questions about the data and documentation. I have shared some information about the HINSCARE variable below that seems relevant for your question, but please follow up if you have further questions about the data after running your analysis with weights.

HINSCARE refers to a question about Medicare coverage without reference to a particular Medicare part (FFS or Part C). No other question in the ACS asks about Medicare coverage, so presumably this should include all Medicare recipients. However, since the ACS is a self-administered questionnaire, interpretation of these questions is ultimately up to survey respondents themselves. You might also check if there are cases of other types of insurance by identifying respondents with HCOVANY = 2 (any medical insurance), but who do not report having any of the types that are separately identified.