Hey guys,
I'm trying to add change variables but it doesn't really work. For the variable coc I need the percentage change (year-(year-1)/(year-1)*100), and for the variables irq, at, beta, lev and bm I need the absolute change (year-(year-1)). Note that every firm (firm id) has its own time series.
Does anybody know the easiest way to create these variables? Showed below are the first rows of my data-set.
Any help would be appreciated. Thanks!
I'm trying to add change variables but it doesn't really work. For the variable coc I need the percentage change (year-(year-1)/(year-1)*100), and for the variables irq, at, beta, lev and bm I need the absolute change (year-(year-1)). Note that every firm (firm id) has its own time series.
Does anybody know the easiest way to create these variables? Showed below are the first rows of my data-set.
Any help would be appreciated. Thanks!
firm id | year | coc | irq | at | beta | lev | bm | csr |
1 | 2011 | - | 0 | - | - | - | - | 0 |
1 | 2012 | - | 0 | 3618.793 | - | 0.405952 | - | 0 |
1 | 2013 | - | 0 | 6613.581 | - | 0.314353 | 0.216467887 | 0 |
1 | 2014 | 0.2352727 | 5.21 | 11573.5 | 1.04333 | 0.376943 | 0.514705297 | 0 |
1 | 2015 | 0.097794 | 26.8 | 14155.22 | 1.88716 | 0.332634 | 1.206526532 | 0 |
3 | 2010 | - | 86.67 | 4946.5 | - | 0.162438 | 0.442065995 | 0 |
3 | 2011 | 0.1431113 | 85.08 | 5323.9 | - | 0.143072 | 0.436034294 | 1 |
3 | 2012 | 0.1606975 | 88.63 | 5627.1 | - | 0.13993 | 0.449940363 | 1 |
3 | 2013 | 0.1445998 | 86.61 | 5736 | - | 0.15713 | 0.365684741 | 1 |
3 | 2014 | 0.100875 | 89.72 | 6325.5 | - | 0.169915 | 0.441926384 | 1 |
3 | 2015 | 0.1558223 | 85.14 | 5932.2 | - | 0.187839 | 0.584596788 | 1 |
Comment