BookmarkSubscribeRSS Feed
Eve
Calcite | Level 5 Eve
Calcite | Level 5

Hi,

I currently work on a new project where I was requested to perform a Cochrane Armitage trend test across adverse events severity grades between two arms.

My data consists of variables:

Category, MedDRA_Term, arm, sev1, sev2, sev3, sev4 ;

where sev1-sev4 correspond to ae_severity and include the number of subjects (please refer to attached document)

Does anybody know how I can edit my dataset in order to perform the test? I would need to combine sev1-sev4 into one variable to use the code below?

proc freq
data=mydata;

tables arm*severity / trend measures cl

exact trend / maxtime=60;

run;

I would really appreciate any input from you!

Many thanks,

Eve

2 REPLIES 2
Haikuo
Onyx | Level 15

For your data on hand, you can choose to put everything into one dataset and subset it on the fly or you can subset upfront by disease. So for example, the subset or individual table should look like (Anemia):

armseveritycounts
112
121
130
140
210
222
231
240

Then the following code (minor modification comparing to yours) can then be run:

PROC FREQ DATA = MYDATA

     ORDER=INTERNAL

;

     WEIGHT counts;

     TABLES arm * severity /

           MEASURES

           TREND

           SCORES=TABLE

      CI

           ALPHA=0.05;

     EXACT MEASURES TREND  /    MAXTIME=60

      ;

  RUN;

Good luck,

Haikuo

Eve
Calcite | Level 5 Eve
Calcite | Level 5

Thank you very much Haiko!

Eve

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

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
  • 510 views
  • 1 like
  • 2 in conversation