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
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
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,
SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!
What’s the difference between SAS Enterprise Guide and SAS Studio? How are they similar? Just ask SAS’ Danny Modlin.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.