BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
Paul_CA
Calcite | Level 5
How do i construct confusion matrix when the target variable is continuous in SAS EG? Thanks
1 ACCEPTED SOLUTION

Accepted Solutions
Reeza
Super User
No, you have to set a cutoff point. If you want to examine how it looks at different cutoff points that becomes ROC analysis.

View solution in original post

8 REPLIES 8
PaigeMiller
Diamond | Level 26

As far as I know, a confusion matrix exists when you try to predict a categorical response. Please explain what it means to compute a confusion matrix for a continuous target variable.

 
--
Paige Miller
Paul_CA
Calcite | Level 5
Target variable ranges between 0 and 1.
ChrisNZ
Tourmaline | Level 20

The target variable must be: 0, 1, and that's it. Nothing in between. 

PaigeMiller
Diamond | Level 26

@Paul_CA wrote:
Target variable ranges between 0 and 1.

I don't think you answered my question: "Please explain what it means to compute a confusion matrix for a continuous target variable."

 

Do you want to use the suggestion from @Reeza where you set a threshold?

--
Paige Miller
Paul_CA
Calcite | Level 5
For clarification, is it possible to generate confusion matrix when the response variable is continuous.
Reeza
Super User
No, you have to set a cutoff point. If you want to examine how it looks at different cutoff points that becomes ROC analysis.
Reeza
Super User

You usually specify a cutoff to make it binary. 

 

If you're using PROC LOGISTIC there's the CTABLE option on the MODEL statement and you specify the different cutoffs you want to test with the PPROB option. 

 


@Paul_CA wrote:
How do i construct confusion matrix when the target variable is continuous in SAS EG? Thanks

https://documentation.sas.com/?docsetId=statug&docsetTarget=statug_logistic_syntax22.htm&docsetVersi...

SAS Innovate 2025: Save the Date

 SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!

Save the date!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 8 replies
  • 2453 views
  • 4 likes
  • 5 in conversation