BookmarkSubscribeRSS Feed
deleted_user
Not applicable
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!
1 REPLY 1
deleted_user
Not applicable
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

SAS Innovate 2025: Call for Content

Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!

Submit your idea!

Health and Life Sciences Learning

 

Need courses to help you with SAS Life Sciences Analytics Framework, SAS Health Cohort Builder, or other topics? Check out the Health and Life Sciences learning path for all of the offerings.

LEARN MORE

Discussion stats
  • 1 reply
  • 6439 views
  • 0 likes
  • 1 in conversation