Hi, anyone could help me on writing the code to construct the following variable?
Cost stickiness it = πππ(ΞCost / Ξππππ)π,π1βπππ(ΞCost / Ξππππ)π,π2
π1,π2 β {π‘β1,β¦,π‘β5} where π1 is the most recent of the last five years with an increase in sales and π2 is the most recent of the last five years with a decrease in sales;
It measures the firm-specific cost adjustment behavior by estimating the difference between the rate of cost increase with respect to sales change for recent years with increasing sales and the corresponding rate of cost decrease with respect to sales change for recent years with decreasing sales.
Thank you in advance!!
Cost stickiness it = πππ(ΞCost / Ξππππ)π,π1βπππ(ΞCost / Ξππππ)π,π2
π1,π2 β {π‘β1,β¦,π‘β5} where π1 is the most recent of the last five years with an increase in sales and π2 is the most recent of the last five years with a decrease in sales;
It measures the firm-specific cost adjustment behavior by estimating the difference between the rate of cost increase with respect to sales change for recent years with increasing sales and the corresponding rate of cost decrease with respect to sales change for recent years with decreasing sales.
Thank you in advance!!
Code:
* Example generated by -dataex-. To install: ssc install dataex clear input long Firm double(Year Sale) float Cost 36704 2019 4.796 2.961 36465 2018 0 . 36569 2018 214.381 . 36572 2018 0 1.223 36571 2018 0 . 36722 2019 5254.815 . 36633 2018 . 232.851 36722 2015 . . 36494 2019 731.4 . 36636 2018 78.503 . 36660 2019 56.693 . 36236 2018 6.829 . 36711 2019 138.18 . 36477 2018 282.195 . 36757 2018 2.166 . 36635 2019 539.501 . 36768 2018 0 . 36619 2019 143.985 . 36726 2017 . . 36399 2018 56.308 3.628 36677 2018 0 . 36641 2019 2438.1 . 36767 2018 37.449 . 36416 2018 319.042 . 36512 2019 1191.821 . 36473 2019 2.319 . 36720 2018 . . 36464 2018 0 . 335466 2015 . . 36558 2019 0 . 36474 2017 . . 36786 2019 .165 . 36779 2019 0 . 36769 2019 0 . 36705 2019 .967 1.809 36642 2019 .115 . 36637 2019 0 . 36570 2019 64.428 16.318129 36599 2019 0 17.126 36571 2019 0 . 36558 2018 0 . 36496 2018 0 . 36477 2019 456.065 95.63548 36474 2015 . . 36471 2018 30.368 . 36464 2019 57.052 . 36084 2019 109.622 . 36769 2018 0 . 335466 2019 41.813 . 36474 2016 . . 36754 2018 91.867 . 36444 2018 126.399 . 335466 2016 . . 36473 2018 .379 . 36569 2019 295.245 . 36641 2016 . . 36633 2019 627.316 246.903 36556 2018 0 . 34609 2018 0 . 36722 2018 4308.874 . 36409 2018 24.669 1.928 36556 2019 0 . 36660 2018 31.299 . 36692 2018 22.5 . 36704 2018 2.067 4.007 36482 2019 57.264 39.476 36718 2018 188.805 . 36637 2018 . . 36635 2018 226.205 . 36728 2018 317.938 . 36570 2018 43.657 . 36330 2019 40.84 100.573 36722 2016 . . 36790 2018 2164 . 36550 2017 . . 36395 2018 322.51 . 335466 2017 . . 36444 2017 . . 36550 2019 424.385 . 36717 2018 146.562 . 36641 2015 . . 36717 2019 204.027 . 36757 2019 2.836 . 36471 2019 54.815 27.752073 36599 2018 .036 11.702 36786 2018 1.135 . 36754 2019 112.103 . 36444 2019 158.381 38.71335 36619 2018 181.974 . 36642 2018 6.55 . 36556 2017 . . 36465 2019 0 . 36555 2019 100.557 . 36084 2018 77.306 . 36641 2018 2452.8 . 36607 2019 0 . 36555 2018 164.09 . 36722 2017 . . 34609 2019 0 . 36615 2019 . . end
Comment