Hello, I have this example dataset.
I am attempting to calculate Simpsons Index using entropytec but I would like to do it over a one year rolling window.
I tried:
But of course, this doesn't solve the problem. Would you have any suggestions?
I am attempting to calculate Simpsons Index using entropytec but I would like to do it over a one year rolling window.
I tried:
Code:
program entropy entropyetc STAFF, by(CUSTOMER YEAR) gen(3=R) end rangerun entropy,interval(YEAR 0 1)
Code:
clear input str1 CUSTOMER double(STAFF YEAR) "A" 1 2015 "A" 1 2015 "A" 1 2015 "A" 2 2016 "A" 2 2015 "B" 1 2014 "B" 1 2014 "B" 1 2014 "B" 1 2015 "B" 1 2015 "A" 2 2016 "B" 2 2015 end
Comment