BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
fikel
Obsidian | Level 7

Hello, I have a dataset that contains the levels of a dietary nutrient for different individuals as well as their cancer outcome and length of follow up/censoring time. I have initially divided up up the nutrient data into quintiles to compare each group's cancer outcomes like this:

proc phreg data = nutrient_dataset;

class nutrient_quintile (ref="0") other_categorical_predictor; model Age_at_EndFollowUp*Cancer_outcome(0) = nutrient_quintile other_categorical_predictor other_continuous_predictor / entry=Age_at_Enrollment rl=wald; run;

Where the predictor/independent variable of interest is nutrient_quintile and other predictors/potential confounders are: other_categorical_predictor and other_continuous_predictor. In reality, there are multiple continuous predictors, but I'm keeping it simple for the post. While analyzing the hazard ratios of the resulting data, it appears that there is a threshold effect for some of the nutrients. What I mean is that instead of seeing each quintile having fewer and fewer cases of cancer, the data shows that once you reach a certain quintile/nutrient level the the risk of cancer stays at about the same lower level. 

 

Example: Quintile 1 Hazard ratio = 1. Quintile 2 Hazard ratio = 1. Quintile 3 Hazard ratio = 0.8. Quintile 4 Hazard ratio = 0.8. Quintile 5 Hazard ratio = 0.8.

 

This means that once individuals reach a certain level of the nutrient, their risk stays at about the same lower level. I am still very new to SAS, but I wanted to see if there was a function, proc, or macro that could be used to find the optimal threshold for this nutrient. The continuous variable would be: nutrient_level. It would somehow identify the nutrient level at which individuals above that level have the lower risk. In the example above, the question would be at what nutrient_level does the risk transition from 1 to 0.8?

 

I know I could guess levels and split the individuals above and below that level until I found the best number, but I know this would take a long time and wanted to see if there were better options.

1 ACCEPTED SOLUTION

Accepted Solutions
SteveDenham
Jade | Level 19

Spoiler alert: This method has not been tried on real data, and might not quite be what you are looking for.

 

I think you can do this using PROC NLMIXED.  Check the example in the documentation here: https://documentation.sas.com/?cdcId=pgmsascdc&cdcVersion=9.4_3.4&docsetId=statug&docsetTarget=statu...  for fitting a failure time/frailty model.  What you would have to do is incorporate a segmented model using nutrient level as a continuous variable.  Code to get started is in the NLIN example here: https://documentation.sas.com/?cdcId=pgmsascdc&cdcVersion=9.4_3.4&docsetId=statug&docsetTarget=statu... 

 

In any case, Mr. Google is your friend.  I got several results on a search for "failure time" and "nlmixed", so there should be something out there.

 

SteveDenham

View solution in original post

2 REPLIES 2
SteveDenham
Jade | Level 19

Spoiler alert: This method has not been tried on real data, and might not quite be what you are looking for.

 

I think you can do this using PROC NLMIXED.  Check the example in the documentation here: https://documentation.sas.com/?cdcId=pgmsascdc&cdcVersion=9.4_3.4&docsetId=statug&docsetTarget=statu...  for fitting a failure time/frailty model.  What you would have to do is incorporate a segmented model using nutrient level as a continuous variable.  Code to get started is in the NLIN example here: https://documentation.sas.com/?cdcId=pgmsascdc&cdcVersion=9.4_3.4&docsetId=statug&docsetTarget=statu... 

 

In any case, Mr. Google is your friend.  I got several results on a search for "failure time" and "nlmixed", so there should be something out there.

 

SteveDenham

Rick_SAS
SAS Super FREQ

To build on Steve's suggestion, look at the article "Segmented regression models in SAS," which shows how to use PROC NLIN to build a segmented regression model. You want to estimate the "cutoff point" at which the response variable reaches a plateau. The article provides data and SAS code.  Notice that you need to use the continuous explanatory variable rather than a binned version of it.

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

Register now!

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
  • 2 replies
  • 484 views
  • 2 likes
  • 3 in conversation