BookmarkSubscribeRSS Feed
Sharan
Obsidian | Level 7

Hi fellow users!

I am looking at the association between antibiotic exposure (exposure var) and risk of diabetes (outcome). Antibiotics are measured as a number of courses and are a continuous variable. I also have created some predefined categories of antibiotics courses. These are as follows: 0 (no exposure); <=3 courses, <= 6 courses, <=9 courses and >= 10 courses.

Now I have already got the hazard ratios, but I would like to know if there is a trend (positive) in the HR with increasing categories of antibiotics. Please suggest what my below syntax should look like when I am testing for trends.

Syntax:

proc phreg data= dataset;

model time  * diab(0) = abx_cat5 / rl;

run;

1 REPLY 1
sbxkoenk
SAS Super FREQ

Hello,

 

Maybe there's a solution within PROC PHREG (I don't know PROC PHREG well enough).
Otherwise I think you can use PROC FREQ for trend test.

 

The below info is taken from 

Usage Note 30333: FASTats: Frequently Asked-For Statistics
https://support.sas.com/kb/30/333.html

  • Cochran-Armitage trend test See Trend test for ordered alternatives
  • Jonckheere-Terpstra test See Trend test for ordered alternatives.
  • Trend test for ordered alternatives
    • For binary responses: Cochran-Armitage test in Base SAS PROC FREQ (TREND option in TABLES statement); SAS/STAT PROC MULTTEST (CA option in TEST statement); score test in SAS/STAT PROC LOGISTIC (equivalent to the Cochran-Armitage test).
    • For binary or multilevel responses: Jonckheere-Terpstra test in Base SAS PROC FREQ (JT option in the TABLES statement).
    • For continuous responses: Use Base SAS PROC CORR with KENDALL option. The p-value for the Kendall statistic is equivalent to the two-tailed p-value for the Jonckheere statistic. The one-tailed p-value is half this p-value. If the number of distinct response values is small, Base SAS PROC FREQ with the JT option can also be used. In small sample situations, an exact test is available (use the EXACT JT; statement).

Koen

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
  • 1 reply
  • 367 views
  • 0 likes
  • 2 in conversation