I am in the early modelling phase and am initially just trying to set up a univariate model (modified Poisson in Proc Genmod) regressing initiation of breastfeeding (0/1) on exposure category (3 categories with varying degree of exposure to a pollutant). The coding is such that initiation=1, but am more interested in modelling initiation=0 (i.e. the default in proc genmod). However, just to make sure the results came out right I reran the model with the descending option. To my surprise the results are identical. I also realize that SAS no longer states what is being modelled as in the good old days.
I would really like to know what I am missing here. Greatful for any input!
First run
Proc GenMod data=final_primi ;
Class ind expcat/param=ref ref=last;
Model initiation= expcat / Dist=poisson Link=log type3;
Repeated subject=ind/ type=exch;
run;
Second run
Proc GenMod data=final_primi desc;
Class ind expcat/param=ref ref=last;
Model initiation= expcat / Dist=poisson Link=log type3;
Repeated subject=ind/ type=exch;
run;
As described in the documentation for the DESCENDING option, it applies only to models with a binary or ordinal multinational response. PROC GENMOD determines the response type by the distribution function that is used, so if you are using a modified Poisson approach and have specified DIST=POISSON the response is not treated as a categorical variable with ordered levels and the DESCENDING option is ignored (there also is no Response Profile table in the displayed output).
I believe for the problem you are interested in you would have to create a new response variable with a 0/1 coding where 1 corresponds to the event you want modeled.
Perhaps I am misunderstanding your model, but it does not look like a Poisson model to me. If the response variable is binary (0/1), then change DIST=POISSON to DIST=BIN. The DESC option now does what you expect it to do.
FYI, you can also bypass the DESC option on the PROC GENMOD statement and specify the order of the response variable by using the MODEL statement. Either of the following will change the order of the target level of the response variable:
Model initiation(event='1') = ... ;
or
Model initiation(DESC) = ... ;
As described in the documentation for the DESCENDING option, it applies only to models with a binary or ordinal multinational response. PROC GENMOD determines the response type by the distribution function that is used, so if you are using a modified Poisson approach and have specified DIST=POISSON the response is not treated as a categorical variable with ordered levels and the DESCENDING option is ignored (there also is no Response Profile table in the displayed output).
I believe for the problem you are interested in you would have to create a new response variable with a 0/1 coding where 1 corresponds to the event you want modeled.
I figured the human factor was involved here... Thanks so much for helping me out!
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!
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.