I've a panel dataset of several banks, each from 1997 to 2015, with annual observations s.t.:
CODE COUNTRY YEAR LOANS_NET ...other variables
671405 AT 1997 39028938
671405 AT 1998 41033237
671405 AT 1999 35735062
...
...
671405 AT 2015 130701872
...
30885R DE 2004 200024673
...
...
Using R, I need to compute additional two columns:
1) LOANS_NET growth rate at 1-year horizon
2) LOANS_NET growth rate at 3-years horizon, which must be annualized, once calculated.
E.g.:
Loan Growth 3-year = [Bank's(i) LOANS_NET Year(t) / Bank's(i) LOANS_NET Year(t-3)] -1
nb: data contains lots of missing values, code must consider that issue! :)