BookmarkSubscribeRSS Feed
deleted_user
Not applicable
Hi all,

I was wondering if there was a way to score a test dataset based upon the results of a logistic regression I had run already, without writing out the equation myself.

It seems like the 'score' procedure works well, but is limited to linear combinations.

Thanks!
4 REPLIES 4
Cynthia_sas
Diamond | Level 26
Hi:
This is not a BASE SAS or reporting procedure (PRINT, REPORT, TABULATE) question.

For more help with SAS/STAT procedures or your statistical questions, your best bet is to contact SAS Tech Support. To send a question to Tech Support, go to http://support.sas.com/ and in the left-hand navigation pane, click on the link entitled "Submit a Problem".

cynthia
deleted_user
Not applicable
I haven't put my foot in my mouth this year yet, so I'm not being brave enough. Time to change that

ODS for most stat procedures, and I'm not clear which procedure you used, will write the results of the analysis to a table. By specifying a suitable target table, you should be able to capture the results of the regression and then insert those terms, either with macro coding, or by using the data set to write the sas code to a file which you then include.

There are many examples on the SAS web site for capturing data from a procedure to a data set and then reinserting it to a later step.
Olivier
Pyrite | Level 9
Hi.
The LOGISTIC procedures offers a SCORE statement (new in version 9). It applies the current model to a different dataset. If you don't want to run the modelling step each time you want to score a new dataset, save your model with the OUTMODEL option when building the model, then use the INMODEL option in the scoring step.
And if you already used the SCORE procedure, just remember that the result has only to be transformed as Pred Prob(Y=1) = 1/(1+EXP(-1 * procScoreResult)).
Regards.
Olivier
deleted_user
Not applicable
ooo, that's exactly what im looking for

thanks for that, i'll give it a shot!

Catch up on SAS Innovate 2026

Nearly 200 sessions are now available on demand with the SAS Innovate Digital Pass.

Explore Now →
How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

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
  • 4 replies
  • 1553 views
  • 0 likes
  • 3 in conversation