Building models with SAS Enterprise Miner, SAS Factory Miner, SAS Visual Data Mining and Machine Learning or just with programming

Classification table (CTABLE) for validation set in proc logistic

Reply
Frequent Contributor
Posts: 126

Classification table (CTABLE) for validation set in proc logistic

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

Super Contributor
Posts: 338

Re: Classification table (CTABLE) for validation set in proc logistic

Posted in reply to chemicalab

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

Frequent Contributor
Posts: 126

Re: Classification table (CTABLE) for validation set in proc logistic

Posted in reply to M_Maldonado

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

Highlighted
Senior User
Posts: 1

Re: Classification table (CTABLE) for validation set in proc logistic

Posted in reply to chemicalab

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

Ask a Question
Discussion stats
  • 3 replies
  • 1196 views
  • 0 likes
  • 3 in conversation