I have a binary dependent variable that I am interested in predicting with historical data. I have 19.000 observations from 1900 and onwards, and I would like to study the relationship between year/decade and the DV. Normally, in my field, what people do is that they code for the decade (1900, 1910, 1920, etc.) without taking into consideration variation within the decades. Also, coding by decade seems a bit arbitrary to me, since it is just a construction of time which has no validity in reality.
Taking that into account, I would like to find another way of grouping historical data than "decade". More specifically, I would like to identify meaningful clusters where the data points group dependending on the value of the DV. In that way, I would theoretically be able to find groups like "1900-1933; 1934-1978; 1979-2019", etc. These different clusters would then constitute a new predictor that I could enter into a GLM as a categorical factor. So the assigned group for each observations needs to be saved as a new variable in the frame.
Another option would of course be to introduce "year" as a numerical factor. However, I am interested in exploring the above explained option.
Does anyone know what type of cluster analysis would be required to be conducted?
Thank you in advance. I am using R for this.