BookmarkSubscribeRSS Feed
MABRINCH
Fluorite | Level 6

Hi

I would like to calculate the APC annual percentage change with 95% CI for the crude incidence of a disease in the period 2010 til 2019. Is it necessary to use joinpoint software? (which I have no clue on how to work with). 

 

I have following data 

 

   year      incidence rate

20103.86
20114.89
20124.91
20134.92
20145.96
20156.02
20166.67
20175.62
20186.04
20196.43
2 REPLIES 2
Sajid01
Meteorite | Level 14

Hello @MABRINCH 

The following code will perform what you need.

In the code IR =Incidence rate and per_ch =percentage change;

data test;
input @1 year @6 IR;
ch_ir=ir-lag(ir);
datalines;
2010 3.86
2011 4.89
2012 4.91
2013 4.92
2014 5.96
2015 6.02
2016 6.67
2017 5.62
2018 6.04
2019 6.43
;
run;
proc sql;
select sum(ir) into:sum_ir from test;
run;
data test2 (drop=ch_ir);
Retain Year IR per_ch;
format per_ch z5.2;
set test;
per_ch=ch_ir*100/&sum_ir;
run;

The output will be like this. 

Sajid01_0-1623846656371.png

Make necessary changes as you may need.

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!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 2 replies
  • 1532 views
  • 1 like
  • 3 in conversation