BookmarkSubscribeRSS Feed
Cruise
Ammonite | Level 13

I’d like to estimate the effect of different types of chemotherapies on survival of cancer patients in considering the effect of other therapies combined with chemo, such as surgery, radiation therapies controlling to cancer stage, race/eth and age. First off, I’d like to construct table shown. How to modify the code below to come up with a table shown? I tried interaction effects with no success.

 

Table. Multivariate analysis, chemotherapy status on survival adjusting to demographics  

Variables

Chemotherapy

Dead

(N,%)

Alive (N,%)

HR (95% CI)

Surgery

Type 1

Type1

N

N

1.00 Reference

 

Type2

N

N

HR (LCL, UCL)

 

Type3

N

N

HR (LCL, UCL)

 

Type4

N

N

HR (LCL, UCL)

 

Type5

N

N

HR (LCL, UCL)

Type 2

Type1

N

N

1.00 Reference

 

Type2

N

N

HR (LCL, UCL)

 

Type3

N

N

HR (LCL, UCL)

 

Type4

N

N

HR (LCL, UCL)

 

Type5

N

N

HR (LCL, UCL)

Type 3

Type1

N

N

1.00 Reference

 

Type2

N

N

HR (LCL, UCL)

 

Type3

N

N

HR (LCL, UCL)

 

Type4

N

N

HR (LCL, UCL)

 

Type5

N

N

HR (LCL, UCL)

Type4

Type1

N

N

1.00 Reference

 

Type2

N

N

HR (LCL, UCL)

 

Type3

N

N

HR (LCL, UCL)

 

Type4

N

N

HR (LCL, UCL)

 

Type5

N

N

HR (LCL, UCL)

Radiation

Type 1

Type1

N

N

1.00 Reference

       

Type2

N

N

HR (LCL, UCL)

 

Type3

N

N

HR (LCL, UCL)

 

Type4

N

N

HR (LCL, UCL)

 

Type5

N

N

HR (LCL, UCL)

Type 2

Type1

N

N

1.00 Reference

 

Type2

N

N

HR (LCL, UCL)

 

Type3

N

N

HR (LCL, UCL)

 

Type4

N

N

HR (LCL, UCL)

 

Type5

N

N

HR (LCL, UCL)

 

/*read in sample data attached*/
proc import datafile="…\have.txt"
out=have
dbms=tab replace;
getnames=yes;
guessingrows=max;
run;
proc phreg data=have;
class
	raceth (ref='2')
	surgery (ref='5') 
	chemo (ref='5')  
	radiation (ref='2')
        stage (ref= '2');
model duration*vital_statusX(1)=chemo
	surgery radiation stage
	age_at_diagnosis raceth 
      /rl selection=stepwise slentry=0.25 slstay=0.35 details;
run;     

 

5 REPLIES 5
Reeza
Super User

You can’t get it by default, you can capture the ODS tables and customize the output via proc tabulate or report. 

There are examples on lexjansen.com and some on my github though I think it’s not quite what you want. 

Cruise
Ammonite | Level 13
Reeza please, I appreciate for some more hints. Do you have links got your github and lexjansen.com?
Reeza
Super User

Sorry, my GitHub one is PROC LIFETEST not PHREG, but it's here: 

https://gist.github.com/statgeek/d3bce2a9e2ef0523db9d

 

The concept is similar. 

 

1. Capture ODS tables blog post:

https://blogs.sas.com/content/iml/2017/01/09/ods-output-any-statistic.html

2. Creating Complex Reports via Cynthia Zender

https://www.lexjansen.com/pharmasug/2008/sas/SA08.pdf

3. Specific PROC PHREG example here, with code:

https://www.lexjansen.com/nesug/nesug07/po/po22.pdf

 

I would highly suggest reading the first two but using the code from the last paper which seems pretty close to what you're looking for. It will need modifications though, which is why you need the first two papers. 

Cruise
Ammonite | Level 13
oh ouch, way beyond my SAS literacy. Hats off. But i need to dedicate good amount of time to digest all these and apply.
Reeza
Super User

Break it into smaller steps and each one on it's own isn't too bad. 

 

1. Capture ODS tables

2. Format using a data step

3. Proc print or report to display. 

 

The code shown has basically generalized this so it works for any process but you don't have to do that and probably shouldn't if you've never done so. Just some examples and you can run them to see how they work and if they're close enough to what you want.

 

 

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!

What is Bayesian Analysis?

Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.

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
  • 5 replies
  • 1674 views
  • 6 likes
  • 2 in conversation