Hello, I have this question I am struggling with for weeks, and I would appreciate so much if I could get your advice and help on this to move forward. Thanks so much for your time and attention in advance! A bit of context I am working on the Medicare Claims data for the calendar year 2012-2014. There is a file called Medicare Beneficiary Summary File every year, which is at an individual level and contains basic information about the individual beneficiary, such as sex, age, date of birth and death, Medicare Part A and B enrollment status, etc. My project sample is the group of Medicare benes who died in the period of 2013 and 2014. Task My task is to create a “dual eligibility status” indicator that shows their dual eligibility status for the 12 months prior to their deaths.There are twelve monthly dual status code variables per individual and if the value is a certain value, I consider them dual-eligibles. Now the dataset I created looks like this: id death_dt ref_yr Dual_01 Dual_02 Dual_03 … Dual_12 ABCDEa 29MAR2014 2012 02 02 02 02 ABCDEa 29MAR2014 2013 02 02 02 02 ABCDEa 29MAR2014 2014 02 00 00 NA ABCDEb 10SEP2013 2012 03 03 06 06 ABCDEb 10SEP2013 2013 06 06 06 00 Stuggles and question For now, as shown above, I have several rows per person depending on their date of death. However, I plan to use only 12 months of data prior to the bene's death year and month to create an indicator of dual eligible status. How can I create a dataset that has only one row per person, id, death date, reference year, and 12 months prior to their death year and month? (e.g., if one person died on March 29, 2014, I want to extract the variables for May 2013 to March 2014.) so I can ultimately identify whether the individual beneficiary was dual-eligible for the last year before their death? Or is there a way to read the information for the 12 months of variables based on the death dates and directly generate an indicator without transforming the dataset? Thank you so much for your help! and I hope my explanation is clear!
... View more