BookmarkSubscribeRSS Feed
juanvg1972
Pyrite | Level 9

Hi,

 

I have a process made in SAS/BASE coding that I want to do now in SAS/EG using workflow.

I have to do a logistic regression. In my below code you can see that I run a logistic regression (training dataset), save the model and after I apply my model with other dataset (validation)

 

proc logistic data=test outmodel=modelo plots=ROC;
class cod_tarifa productos;
model hc_consumo=cod_tarifa productos;
quit;

/*

/* Apply model*/

proc logistic inmodel=modelo;
score data=validar out=validar1;
quit;

 

I am trying to do it with logistic regression task in a workflow. I can select target variable (hc_consumo) and features (cod_tarifa productos), but I don't know how to save the model, and how to apply after hist model, is it possible in a SAS/EG guided task.

 

Any advice will be greatly appreciated

 

Juan

2 REPLIES 2
ChrisHemedinger
Community Manager

Hi Juan,

 

I don't think that the Logistic Regression task supports the SCORE statement.

 

There is this task: Tasks->Data Mining->Model Scoring.  This allows you to run a stored model against another data set, but the model must be registered in a SAS Metadata repository.  (The task is available only if you are connected to a SAS Metadata environment.) That is, you would need to use something like SAS Model Manager or SAS Enterprise Miner to have registered your model from a previous step, then you can select the model to use with your validation data.

 

Otherwise, you would need to do what you're doing: build the model in the Logistic Regression task, but then use a SAS program node to score it.

 

Others who have expertise in data mining might have a better answer.

 

Chris

SAS For Dummies 3rd Edition! Check out the new edition, covering SAS 9.4, SAS Viya, and all of the modern ways to use SAS!
juanvg1972
Pyrite | Level 9

Thanks for your help, Chris

 

I will try model scoring tasks. Previosuly I would like to save the model, is it possible from the Logistic Reg task of SAS/EG.

I think it is not posiible, but I am not sure.

 

Thanks,

hackathon24-white-horiz.png

2025 SAS Hackathon: There is still time!

Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!

Register Now

Creating Custom Steps in SAS Studio

Check out this tutorial series to learn how to build your own steps in SAS Studio.

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
  • 2 replies
  • 2611 views
  • 0 likes
  • 2 in conversation