I have a dataset that includes per respondent three variables with his full date of birth (day, month, year). I want to create a dummy variable based on a range of date of birth. For example, those born between December 1, 1948 and August 31, 1949 should be labeled as intervention group, while those born between September 1, 1949 and May 31, 1950 should be the comparison group.
I think that a dummy variable would be a good way to denote these groups, where 1 represents the intervention group, and 0 the comparison group.
However, not all respondents in the dataset have these dates of births, some cannot be considered intervention or comparison group participant.
What would be the best way to do this? Later on, I want to use the dummy variable in a regression analysis. There I can only include those participants either in the comparison or intervention group.
Can anyone please help me with this? I can't find the solution on my own.
Thanks already!