turn on suggestions

Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

Find a Community

- Home
- /
- Analytics
- /
- Stat Procs
- /
- How to calculate a confusion matrix (or ROC curve)...

Topic Options

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

04-02-2013 11:31 AM

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

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

04-02-2013 11:48 AM

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

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

04-02-2013 12:22 PM

@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?