Dear Stata experts,
I am trying to generate new variable based on the following command
bysort firmid year: gen finlev = (debt_n/ TA)
But, the results are not correct, i.e., if doing this calculations (finlev = (debt_n/ TA)) mannually the results are different that those generated by the above command.
I would appreciate your suggestions.
below is the dataex of mine.
I am trying to generate new variable based on the following command
bysort firmid year: gen finlev = (debt_n/ TA)
But, the results are not correct, i.e., if doing this calculations (finlev = (debt_n/ TA)) mannually the results are different that those generated by the above command.
I would appreciate your suggestions.
below is the dataex of mine.
Code:
input int(firmid year) str13 identifier int(TA debt_n) 1 2011 "KABO.CA" 3201 6755 1 2012 "KABO.CA" 2438 6241 1 2013 "KABO.CA" 2410 5870 1 2014 "KABO.CA" 1925 5250 1 2015 "KABO.CA" 1491 3550 1 2016 "KABO.CA" 7068 632 1 2017 "KABO.CA" 7435 1198 1 2018 "KABO.CA" 7610 631 1 2019 "KABO.CA" 7657 1025 1 2020 "KABO.CA" 7661 978 2 2011 "AKSA.IS" 8167 3327 2 2012 "AKSA.IS" 8162 1850 2 2013 "AKSA.IS" 8048 1803 2 2014 "AKSA.IS" 8088 1817 2 2015 "AKSA.IS" 7733 2813 2 2016 "AKSA.IS" 7638 3041 2 2017 "AKSA.IS" 8205 3999 2 2018 "AKSA.IS" 7805 4367 2 2019 "AKSA.IS" 7458 3351 2 2020 "AKSA.IS" 7181 3262 3 2011 "IHEVA.IS" 1852 1571 3 2012 "IHEVA.IS" 2213 2859 3 2013 "IHEVA.IS" 1227 1990 3 2014 "IHEVA.IS" 702 6279 3 2015 "IHEVA.IS" 8509 4088 3 2016 "IHEVA.IS" 7537 3051 3 2017 "IHEVA.IS" 7264 1960 3 2018 "IHEVA.IS" 6269 891 3 2019 "IHEVA.IS" 7798 7139 3 2020 "IHEVA.IS" 7211 410
Comment