I need to calculate the overlap of two variables (time series). I saw that in R, the command is "calc.overlap". Is there any way to run this in Stata? The goal is to see the similarity (or not) between the preferences of poor and rich people over time - from 1980 to 2018. I'm already satisfied if I can accomplish this for a specific year.