BookmarkSubscribeRSS Feed
issac
Fluorite | Level 6

Hi folks;

I'm trying to fit a hierarchical logistic regression with GLIMMIX procedure that allows for random effect at level-1 unit (here in my case is patient id). Here is the code:

* data is sorted by id;

ods html close;

ods html;

proc glimmix

     class id sex;

     model label= sex score / dist=binary link=logit;

     random id;

     output out=out1 predpredicted;

run;

where "score" is a continuous predictor and "label" is the binary class of patients (0: died and 1: survived). Now the question is how I can calculate a confusion matrix (table of actual versus predicted class labels) from this fitting?

Thanks!

Issacglimix

2 REPLIES 2
Reeza
Super User

If you took the predicted output and ran a proc freq would that give you your confusion matrix?

issac
Fluorite | Level 6

@Reeza

Thanks. It's a good hint to use proc freq after proc glimmix. But honestly I am not sure which of "Pred" or "PredPA" is the best option for doing the job. Could you explain further?

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

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