BookmarkSubscribeRSS Feed
nexterd
Fluorite | Level 6

Hello.

I am trying to create an exposure-response (or dose-response) plot by Hazard Ratio, which was calculated by time-dependent Cox proportional regression. An example I am attaching with is from Tomczak et al. (2016), but it was constructed by R.

 

spline.JPG

 

So I want to find out how to draw an exact or similar plot in SAS. I've already tried some methods including the way LinusS posted in https://communities.sas.com/t5/SAS-in-Health-Care-Related/How-do-I-plot-the-spline-effect-in-PHREG/t...

But it draws something that needs to fix i.e., zeroing the CI at the reference value (in this case, it's the median) like below.

 

20190624_105318.png

 

I think it explains about rate ratio/rate ratio (of the reference) not just rate ratio. Also, since it was set as using type=log in PROC SGPLOT, the intervals of y-axis are all different. Is it okay if I change it's type to linear intead of log? In my dataset, all individuals have been assigned each value of exposure and survival time to estimate HRs. And I am using SAS EG 7.1. Thank you for your help in advance.

 

 

 

5 REPLIES 5
Rick_SAS
SAS Super FREQ

Which of the following are you asking:

1. How to compute the points and CI in SAS

or

2. You have the points and CI, and you want to know how to plot them by using PROC SGPLOT. 

 

nexterd
Fluorite | Level 6

I’ve already calculated one HR and one CI (not at each point of x-axis). But if I have to yield every point and CI before plotting, I want to know how to calculate them either. Thanks.

mleslie
Calcite | Level 5

Hi Rick, 

 

I have a related question regarding the computation of CI's for splines in PHREG. 


I have been successfully using the %est macro described by LinusS_ in this post (https://communities.sas.com/t5/SAS-Health-and-Life-Sciences/How-do-I-plot-the-spline-effect-in-PHREG... ) 

 

However, similar to the SAS graph above in this post, the confidence interval is essentially zero at the reference point, whereas similar code I have tried in R produces a continuous CI that does not approach zero width at the reference point. 

 

I am having difficulty finding statistical literature related to the validity of the CI estimation in SAS as opposed to what is produced in R and was wondering if you would be able to provide insight into these different methods of CI computation and whether there is a way to compute CIs in SAS that do not approach zero at the reference point for the spline. 

 

Thank you for your consideration and help!

Rick_SAS
SAS Super FREQ

I have no idea whether your CIs are valid or not. I suggest you post your data and SAS code if you want the community to provide feedback.

mleslie
Calcite | Level 5
Thank you for your feedback; I will create a new post with example data and code regarding my question.

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!

What is ANOVA?

ANOVA, or Analysis Of Variance, is used to compare the averages or means of two or more populations to better understand how they differ. Watch this tutorial for more.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 5 replies
  • 1530 views
  • 0 likes
  • 3 in conversation