BookmarkSubscribeRSS Feed
ajames2020
Fluorite | Level 6

How do I get the p-value for trend, with the Odds Ratio using a multivariate Logistic Regression? I found a guide that explained how to do this for one predictor variable. It explained that you would use the Score test in the Testing Global Null Hypothesis table. (The score test is equivalent to the Cochran-Armitage trend test). 

 

My issue is approaching this when other covariates are added to the model. Yes I can run a logistic regression with my main predictor - lets call that "A," for example, and say I want to control for age. How do I get the p-value for trend in this case?  

 

(My outcome is binary do I have to use a logistic regression).

4 REPLIES 4
PGStats
Opal | Level 21

The p-value for a linear trend is in the Analysis of Maximum Likelihood Estimates table. Show your code for more detailed advice.

PG
ajames2020
Fluorite | Level 6

The p-value for linear trend is not in the Maximum Likelihood tables. That table has the the p-value for the predictor variable in reference to the outcome variable, or one level of a predictor compared to the other in reference to the outcome. 

ballardw
Super User

@ajames2020 wrote:

The p-value for linear trend is not in the Maximum Likelihood tables. That table has the the p-value for the predictor variable in reference to the outcome variable, or one level of a predictor compared to the other in reference to the outcome. 


Might indicate that your code did not request it. Or the data won't support the request.

 

Which is why we want to see the code, and best is from the log to include any notes about numbers of observations used. Copy the text from the log including the code and any messages or notes, paste into a code box opened on the  forum using the </> icon at the top of the message window.

StatDave
SAS Super FREQ

If you want to compare two odds ratios, then you must have a log odds for each of the two groups at two times or under two different treatments or conditions. The GROUP*TIME parameter below is the log ratio of the two odds ratios, so exponentiating it estimates the ratio of the two odds ratios.

proc logistic;
class group time;
model y = group time group*time;
run;

Similarly, you can test for trend of several odds ratios. The following tests the trend over years assuming independent observations. Note that YEAR is not in the CLASS statement.

proc logistic;
class group;
model y = group year group*year;
run;

Ready to join fellow brilliant minds for the SAS Hackathon?

Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.

Register today!
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
  • 4 replies
  • 5409 views
  • 0 likes
  • 4 in conversation