BookmarkSubscribeRSS Feed
Manije72
Calcite | Level 5

Hi

I want to assess the association of fruit (three levels of intake) with odds of high creatinine (tertile). I did ordinary logistic regression. How can I get P-trend for ordinary logistic regression?

When I do ordinary logistic regression in SAS, I get the same odds ratio when select "event" 1, or 3. It means the odds ratio is the same when I compare tertile 3 vs 1 or tertle 1 vs 3? Is it true? How can I limit it to tertile 3 to 1? Can you share the code?

I used this code:

proc logistic data=w plots(only)=(effect oddsratio);

class fruit(ref='0')Sex(ref='1')/param=ref;

model creatinine(event='1')= fruit Age Sex BMI_A /Clodds=wald;

title " Association of fruit with high creatinin (adjusted for age Sex BMI_A ) ";

run;

exposure: fruit

outcome: creatinine

covariates: age, sex, BMI

 

3 REPLIES 3
StatDave
SAS Super FREQ
It's not clear from your text, but I assume that your response (creatinine) has three levels, 1, 2, or 3, and that your primary predictor of interest (fruit) also has three levels, presumably coded 0, 1, or 2. If so, then as indicated by a note in the log, the EVENT= option is ignored since the response is being treated as ordinal. As a result, you get one odds ratio for fruit=2 which tells you the adjusted odds of a lower creatinine in the fruit=2 group as compared to the fruit=0 group. And you get another odds ratio for fruit=1 comparing odds of lower creatinine in fruit=1 vs fruit=0. Yes, for each fruit level, the odds ratios are the same whether you dichotomize creatinine as 1 vs 2 and 3 or as 1 and 2 vs 3. That is the proportional odds model. If you want to allow the odds ratios to differ depending on the dichotomization of creatinine, you can add the UNEQUALSLOPES=(FRUIT) option in the MODEL statement to allow for nonproportional odds on that variable. Then you will get 4 odds ratios, not just 2, for fruit.
Manije72
Calcite | Level 5

Thank you for your response.

Can you tell me how I can get P for trend for odds ratios which I gained from logistic regression? How can I do test for trend for logistic regression? Can you share the relevant code for P for trend for crude and adjusted models?

StatDave
SAS Super FREQ
If you mean you want to test for a trend as your FRUIT predictor increases, then you need to treat that predictor as continuous by removing it from the CLASS statement. Then you will have one parameter estimate for FRUIT that is a test of the effect of a unit increase in FRUIT on the odds of lower CREATININE.

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!

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