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: Save the Date

 SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!

Save the date!

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
  • 6459 views
  • 0 likes
  • 1 in conversation