Hi there!
I need help with the following equation
X = log(change in cost ÷ change in sale)i,T - log(change in cost ÷ change in sale)i,T
T, T ϵ (t, …., t-3)
Where T is the most recent of the last four quarters with a decrease in sales and T is the most recent of the last four quarters with an increase in sales. I can’t comprehend how to go about with the command on Stata for this.
In the variable list saleC is the change in sale, costC is change in cost, saleD =1 means the quarter with decrease in sale from prior quarter and saleI=1 means the quarter with increase in sale from prior quarter
* Example generated by -dataex-. To install: ssc install dataex
clear
input long(gvkey datadate) double(ibq saleq) float(cost saleC costC saleD saleI)
1000 5568 .19 11.295 11.105 -.102 -.013000488 1 .
1000 5659 .875 14.441 13.566 3.146 2.4610004 . 1
1000 5751 .613 13.122 12.509 -1.319 -1.0570002 1 .
1000 5843 .606 12.334 11.728 -.788 -.7810001 1 .
1000 5934 .726 16.226 15.5 3.892 3.772 . 1
1000 6025 1.603 19.637 18.034 3.411 2.5340004 . 1
1000 6117 .561 14.733 14.172 -4.904 -3.8620005 1 .
1000 6209 .544 15.818 15.274 1.085 1.1020002 . 1
1000 6299 .563 18.014 17.451 2.196 2.177 . 1
1000 6390 .975 21.203 20.228 3.189 2.7770004 . 1
1000 6482 .484 19.359 18.875 -1.844 -1.3530006 1 .
1000 6664 .173 18.92 18.747 -.439 -.12800026 1 .
1001 8490 .07 4.921 4.851 . . . 1
1001 8581 .452 5.859 5.407 .938 .55600023 . 1
1001 8673 .364 6.449 6.085 .59 .678 . 1
1001 8765 .249 8.166 7.917 1.717 1.8319998 . 1
1001 8856 .257 6.434 6.177 -1.732 -1.7399998 1 .
1001 8947 .425 7.559 7.134 1.125 .9569998 . 1
1001 9039 .403 8.058 7.655 .499 .5210004 . 1
1001 9131 .053 9.956 9.903 1.898 2.2479997 . 1
1001 9221 .292 7.865 7.573 -2.091 -2.33 1 .
1001 9312 .5 9.348 8.848 1.483 1.2749996 . 1
1001 9404 1.257 16.327 15.07 6.979 6.222 . 1
1001 9496 .527 20.258 19.731 3.931 4.661001 . 1
1001 9586 .164 13.997 13.833 -6.261 -5.898001 1 .
1003 8400 .929 12.748 11.819 . . . 1
1003 8490 .137 2.647 2.51 -10.101 -9.309 1 .
1003 8581 .331 3.522 3.191 .875 .681 . 1
1003 8673 .179 2.963 2.784 -.559 -.4070001 1 .
1003 8765 .403 4.661 4.258 1.698 1.474 . 1
1003 8856 .068 2.419 2.351 -2.242 -1.907 1 .
1003 8947 .074 2.853 2.779 .434 .428 . 1
1003 9039 .119 3.241 3.122 .388 .3429999 . 1
1003 9131 .126 5.316 5.19 2.075 2.068 . 1
1003 9251 .041 2.761 2.72 -2.555 -2.47 1 .
1003 9435 .094 7.425 7.331 4.664 4.611 . 1
1003 9527 .181 8.76 8.579 1.335 1.2480006 . 1
1003 9616 .072 7.392 7.32 -1.368 -1.2590003 1 .
1003 9800 .148 10.174 10.026 2.782 2.706 . 1
1003 9892 .599 10.881 10.282 .707 .25599957 . 1
1003 9981 .135 8.852 8.717 -2.029 -1.5649996 1 .
end
I need help with the following equation
X = log(change in cost ÷ change in sale)i,T - log(change in cost ÷ change in sale)i,T
T, T ϵ (t, …., t-3)
Where T is the most recent of the last four quarters with a decrease in sales and T is the most recent of the last four quarters with an increase in sales. I can’t comprehend how to go about with the command on Stata for this.
In the variable list saleC is the change in sale, costC is change in cost, saleD =1 means the quarter with decrease in sale from prior quarter and saleI=1 means the quarter with increase in sale from prior quarter
* Example generated by -dataex-. To install: ssc install dataex
clear
input long(gvkey datadate) double(ibq saleq) float(cost saleC costC saleD saleI)
1000 5568 .19 11.295 11.105 -.102 -.013000488 1 .
1000 5659 .875 14.441 13.566 3.146 2.4610004 . 1
1000 5751 .613 13.122 12.509 -1.319 -1.0570002 1 .
1000 5843 .606 12.334 11.728 -.788 -.7810001 1 .
1000 5934 .726 16.226 15.5 3.892 3.772 . 1
1000 6025 1.603 19.637 18.034 3.411 2.5340004 . 1
1000 6117 .561 14.733 14.172 -4.904 -3.8620005 1 .
1000 6209 .544 15.818 15.274 1.085 1.1020002 . 1
1000 6299 .563 18.014 17.451 2.196 2.177 . 1
1000 6390 .975 21.203 20.228 3.189 2.7770004 . 1
1000 6482 .484 19.359 18.875 -1.844 -1.3530006 1 .
1000 6664 .173 18.92 18.747 -.439 -.12800026 1 .
1001 8490 .07 4.921 4.851 . . . 1
1001 8581 .452 5.859 5.407 .938 .55600023 . 1
1001 8673 .364 6.449 6.085 .59 .678 . 1
1001 8765 .249 8.166 7.917 1.717 1.8319998 . 1
1001 8856 .257 6.434 6.177 -1.732 -1.7399998 1 .
1001 8947 .425 7.559 7.134 1.125 .9569998 . 1
1001 9039 .403 8.058 7.655 .499 .5210004 . 1
1001 9131 .053 9.956 9.903 1.898 2.2479997 . 1
1001 9221 .292 7.865 7.573 -2.091 -2.33 1 .
1001 9312 .5 9.348 8.848 1.483 1.2749996 . 1
1001 9404 1.257 16.327 15.07 6.979 6.222 . 1
1001 9496 .527 20.258 19.731 3.931 4.661001 . 1
1001 9586 .164 13.997 13.833 -6.261 -5.898001 1 .
1003 8400 .929 12.748 11.819 . . . 1
1003 8490 .137 2.647 2.51 -10.101 -9.309 1 .
1003 8581 .331 3.522 3.191 .875 .681 . 1
1003 8673 .179 2.963 2.784 -.559 -.4070001 1 .
1003 8765 .403 4.661 4.258 1.698 1.474 . 1
1003 8856 .068 2.419 2.351 -2.242 -1.907 1 .
1003 8947 .074 2.853 2.779 .434 .428 . 1
1003 9039 .119 3.241 3.122 .388 .3429999 . 1
1003 9131 .126 5.316 5.19 2.075 2.068 . 1
1003 9251 .041 2.761 2.72 -2.555 -2.47 1 .
1003 9435 .094 7.425 7.331 4.664 4.611 . 1
1003 9527 .181 8.76 8.579 1.335 1.2480006 . 1
1003 9616 .072 7.392 7.32 -1.368 -1.2590003 1 .
1003 9800 .148 10.174 10.026 2.782 2.706 . 1
1003 9892 .599 10.881 10.282 .707 .25599957 . 1
1003 9981 .135 8.852 8.717 -2.029 -1.5649996 1 .
end
Comment