Hi i'm new here. I have to make a Replication Study and I need to make a variable: UTB ADDS
UTB ADDS = the five-year sum of additions to UTB from current-year positions (TXTUBPOSINC) divided by the five-year sum of sales (SALE). We multiply UTB ADDS by 100.
I created this but I'm not sure if this is right, because i get the same answer for the company and not per year:
. by gvkey: egen txtubposinc_sum = total(txtubposinc) if inrange(year, year[_n]-4, year[_n])
. by gvkey: egen sale_sum = total(sale) if inrange(year, year[_n]-4, year[_n])
. gen UTB_ADDS = (txtubposinc_sum / sale_sum) * 100
UTB ADDS = the five-year sum of additions to UTB from current-year positions (TXTUBPOSINC) divided by the five-year sum of sales (SALE). We multiply UTB ADDS by 100.
I created this but I'm not sure if this is right, because i get the same answer for the company and not per year:
. by gvkey: egen txtubposinc_sum = total(txtubposinc) if inrange(year, year[_n]-4, year[_n])
. by gvkey: egen sale_sum = total(sale) if inrange(year, year[_n]-4, year[_n])
. gen UTB_ADDS = (txtubposinc_sum / sale_sum) * 100
Comment