BookmarkSubscribeRSS Feed
Ms_Raza
Calcite | Level 5

Hi,

I want to ask how can I use ordinally categorised exposure variable as ordinal variable in poison regression.

Below is my current code where i am getting estimate for each cat vs reference category. 

proc genmod data=f1;
     class temperature_mean4 region;
     format temperature_mean4 cat_temp.;
	 model start = winter region temperature_mean4 / dist=poisson offset=lnwinters type3;
	 *Rate per 1000 winters*;
	 lsmeans temperature_mean4 / exp cl; 
	 *Rate Ratios*;
	 estimate 'cat2 vs  cat1' temperature_mean4 -1 1 0 0 ;
	 estimate 'cat3 vs  cat1' temperature_mean4 -1 0 1 0 ;
	 estimate 'cat4 vs  cat1' temperature_mean4 -1 0 0 1 ;
run;

I want to assess if there is ordinal impact of exposure on outcome. 

 

Any help leading to a solution is highly appreciated.

1 REPLY 1
StatDave
SAS Super FREQ
You haven't indicated which variable is your "exposure" variable. I'm guessing it is the temperature variable. And it isn't clear what you mean by assessing the "ordinal impact", but I assume that means you just want to treat temperature as continuous rather than categorical. That is easily done by simply removing the temperature variable from the CLASS statement. You can then drop the LSMEANS and ESTIMATE statements. The single parameter estimate for temperature that results is the linear effect of temperature on the log rate. If you want to allow temperature to have a more complex association with the log rate than just linear, then you can either add higher order effects like squared (temp*temp), cubic (temp*temp*temp), and so on, or even use a spline effect using the EFFECT statement. The spline effect allows for very flexible shapes of the association curve. See this note (https://support.sas.com/kb/67/024.html) and similar notes.

sas-innovate-wordmark-2025-midnight.png

Register Today!

Join us for SAS Innovate 2025, our biggest and most exciting global event of the year, in Orlando, FL, from May 6-9. Sign up by March 14 for just $795.


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
  • 511 views
  • 1 like
  • 2 in conversation