Calculating percent change...

Reply
N/A
Posts: 0

Calculating percent change...

Hi,
I have data like the following with two variables (old and new):

Old New
5 8
2 6
10 3
54 48
25 14
................and so on.
How do I calculate the percent change from the old to the new using SAS?
thanks very much!
N/A
Posts: 0

Re: Calculating percent change...

data numbers;
input old new;
datalines;
5 8
2 6
10 3
54 48
25 14
run;

data perchange;
set numbers;
perchg = ((New-old)/old)* 100;
run;

I think this should help. Format you perchg to limit the display of the decimals.

APS
Post a Question
Discussion Stats
  • 1 reply
  • 2350 views
  • 0 likes
  • 1 in conversation