BookmarkSubscribeRSS Feed
StephanieB
Calcite | Level 5

Hi everyone,

I would like to create prior probabilities exactly like we can do it in SAS EM. However, I would like to run everything in SAS Base, so I was wondering if I need to create a specific code for that?

Any ideas?

Many thanks!!

4 REPLIES 4
Reeza
Super User

StephanieB wrote:

"create prior probabilities exactly like we can do it in SAS EM"

Where in SAS EM are you creating prior probabilities that you'd like to replicate?  Logistic Regression or something else?

StephanieB
Calcite | Level 5

Yes sorry I should have precised. I am using a logistic regression.

My training sample is 50/50, although my event is less than 2% in my whole population.

I would like to add that in SAS base.

In SAS EM, I just precise the prior probabilities by right clicking on the dataset >> Prior probabilities.

Reeza
Super User

You should check what the prior probability default is in EM, but I think what you're looking for is

1/p and 1/(1-p) where p is the probability of your event.

Please do double check, because it really depends on what your question is and other situations. It would help if you provided more details, and I also don't have time today to dig into this.

SteveDenham
Jade | Level 19

I think where was going was that you really cannot calculate priors from logistic regression in Base SAS--you will need SAS/STAT to access one of the procs capable of logistic regression (LOGISTIC, GENMOD, GLIMMIX, CATMOD).

Steve Denham

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

How to choose a machine learning algorithm

Use this tutorial as a handy guide to weigh the pros and cons of these commonly used machine learning algorithms.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 4 replies
  • 1268 views
  • 0 likes
  • 3 in conversation