
data growth;
input firm sales year
datalines;
A 2400 2001
A 2500 2002
A 2600 2003
A 2700 2004
A 2800 2005
B 1500 2001
B 1600 2002
B 1700 2003
B 1800 2004
B 1900 2005
C 3100 2001
C 3200 2002
C 3300 2003
C 3400 2004
C 3400 2005
;
I need 3 output column under growth_in_1yr , growth_in_2yrs & growth_in_3yrs
for percentage change in sales over 1,2 and 3 years for each firm and each year.
in other words, how much the sales changed(%) in 1 yr , 2 yr & 3 yr in separate column for each firm on each year.
But the problem is data always overlaps with other firms. I am new in SAS and programming. So its really confusing for me.