Hi there!
I'm trying to model ordinal data and I'm not sure how to do it. What I try to do is called in vet epidemiology a continuation-ratio model, which relates the probability of being in a category to the probability of being in any lower category. I would then produce a complete set of coefficients for each of the categories above the baseline.
I'm not sure I have the right approach to do this... because it does not seem to give me the results by categories as I expect...
proc glimmix data=Qu_c method=quad (initpl=5 qpoints=7) plots=residualpanel;
class no_ferme type_lit(ref="0") type_stab(ref="2") Epais_lit(ref="0")pis ;
model pis = type_lit type_stab Epais_lit/ dist=mult link=clogit solution or;
random intercept / subject=no_ferme;
estimate " RMS Vs straw" type_lit 1 -1/ or;
run;
pis= hygiene score of the udder (1, 2, 3, or 4)
type_lit= my main predictor (0, 1)
type_stab (0, 1) and Epais_lit (0, 1) are covariates
I don't know if SAS grammary for the type of model I try to realize is different than how the model is called in my books...
So.... thank you for your advices!:)
Your code looks fine. Statisticians call this a cumulative logit model, but your description sounds similar.
You do not state why you think "it does not seem to give me the results by categories as I expect." Perhaps post your parameter estimates and explain what you expect versus what you are seeing?
If the odds ratio table is not what you expect, be sure to read this section of the doc. The table shows the log-odds. You can get the odds ratio by exponentiating the difference.
Yeah sorry if I'm not clear. Here are the estimates:
My goal is to have 3 odds ratios:
Odd of having a hygiene udder score of 2 vs1
Odds of having a score of 3 vs (1 and 2)
Odds of having a score of 4 vs (1, 2 and 3).
I'm not sure if my model is equivalent of your link one....
ln p(Y=j)
p(Y<j)
Thanks
When you are looking for a particular statistic or method in SAS, check the list of Frequently Asked-for Statistics (FASTats) in the Important Links section of the Statistical Procedures Community page. See the "Continuation ratio logit model" item in FASTats which points you to a note on the wide variety of logistic models that can be fit in SAS. The entry there on the continuation ratio logit model briefly describes the model and now it can be fit and points to an example that shows ways that you can fit the model. The second method using PROC LOGISTIC should be possible for you to do using PROC GLIMMIX in the same way. Or you could use PROC GEE to fit a GEE type of model to each of the continuation ratio logits.
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 16. 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.