BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
aranganayagi
Obsidian | Level 7

HI, I am new to SAS Logistic Regression. I learnt it in Octave first and trying to implement in SAS. 

In Octave, I learnt that there is learning curve for Training & cross validation data which is plotted between Number of Training sample and Cost function to check whether there is Bias or Variance. Can you help to get similar graph in SAS. I am not sure whether it is referred by different name. 

1 ACCEPTED SOLUTION

Accepted Solutions
Reeza
Super User
Did you check the diagnostic example?

View solution in original post

6 REPLIES 6
aranganayagi
Obsidian | Level 7

HI, I am running logistic regression for first time in SAS. can you help me to get cost function (J) in the model

I guess that different name could have used in SAS. I am basically trying to plot Learning curve on Training and Cross validation Set to see whether there is bias or variance. Could you please help me on this.

Rick_SAS
SAS Super FREQ

Welcome to SAS.

 

Unless you are a student and you are trying to implement logistic regression as a class project, I suggest that you use a built-in procedure to perform logistic regression.  The LOGISTIC procedure and the HPLOGISTIC procedure in SAS/STAT enable you to use one training and one validation data set. 

 

For PROC LOGISTIC, you can use the DATA= statement to specify the training data. In PROC LOGISTIC you can use the SCORE statement to evaluate the model on a validation data set and write the predictions to a data set. There are many ways you can measure the fit (cost function) for logistic models. See the section of the doc "Fit Statistics for Scored Data Sets".

 

Because you mention cross validation, I will mention the GLMSELECT procedure, which supports k-fold cross validation.

 

 

Reeza
Super User
'learning curve' is the ROC curve?
Reeza
Super User
I would suggest going through the examples and see if you find what you need. The terms aren't ringing a bell for me either unfortunately.

https://documentation.sas.com/?docsetId=statug&docsetVersion=15.1&docsetTarget=statug_logistic_examp...
aranganayagi
Obsidian | Level 7
Thanks for your replies. Can you please me to check whether the model is overfitting or underfitting. Is there any option to check this.
Reeza
Super User
Did you check the diagnostic example?

SAS Innovate 2025: Register Now

Registration is now open for SAS Innovate 2025 , our biggest and most exciting global event of the year! Join us in Orlando, FL, May 6-9.
Sign up by Dec. 31 to get the 2024 rate of just $495.
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
  • 6 replies
  • 1384 views
  • 0 likes
  • 3 in conversation