BookmarkSubscribeRSS Feed
chemicalab
Fluorite | Level 6

Hi,

I am running a logistic regression model in SAS base and while i am able to obtain a CTABLE for the training set , I cant seem to find how i will get it when scoring the  validation set for the validation set

What is missing int he below code so i can obtain the CTABLE for the validation set and see where the optimal cut off point is?

PROC LOGISTIC INMODEL=MODELPARAMETERSTRAINING    ;

  SCORE DATA=VALIDATION

     OUT= VALID_SCORED

     OUTROC=ROC_VAL ROCEPS=0.1

    ;

RUN;

Regards

3 REPLIES 3
M_Maldonado
Barite | Level 11

Hey Chemicalab,

Sorry, I don't know much beyond the basics of proc logistic. I mostly use proc dmreg within Enterprise Miner.

Not sure how to get the option you need, but a workaround would be to use the Score statement in proc logistic to score your validation set.

More info about proc logistic score statement here: https://support.sas.com/documentation/cdl/en/statug/63033/HTML/default/viewer.htm#statug_logistic_se...


I hope it helps!

Miguel

chemicalab
Fluorite | Level 6

Realised that i can do the computations by myself using the out roc, thank you for the information though

Cheatan_478
Calcite | Level 5

@chemicalab Can you please help me with the code on how we can get the classification table for validation data. Below is my code.

proc logistic data=training outmodel=newsModel;
      class sex;
      model subs=sex age / link=glogit ctable outroc=d;
      score data=training out=Score2;
run;

proc logistic noprint inmodel=newsModel;
       score data=validation out=ScoredTest;
proc print data=ScoredTest label noobs;

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!

How to choose a machine learning algorithm

Use this tutorial as a handy guide to weigh the pros and cons of these commonly used machine learning algorithms.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 3 replies
  • 3581 views
  • 0 likes
  • 3 in conversation