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

hello, people,

 

I have met this problem that when I run the score statement, the oversampling part is wrong, can anyone help me figure it out? (here is the screen shot of the problem).

 

thanks.

 


Capture.PNG
1 ACCEPTED SOLUTION

Accepted Solutions
collinelliot
Barite | Level 11

Your code makes reference to a macro variable called "p1." Where you use it in the code, it should resolve the name of a variable in your score data that has the prior probability of an event. I have absolutely no way to know what the name of that variable is, but I think you have a few options.

 

If you know what the variable is supposed to be, you can 1) hard code it so that "priorevent = your_variable" or 2) set p1 to the variable value with "%let p1 = your_variable" above your proc logistic. Alternately you can try just removing the "priorevent=&p1" from your code, but if it was there before, it's likely there for a reason.

View solution in original post

4 REPLIES 4
collinelliot
Barite | Level 11

Your issue is a macro variable reference that doesn't resolve, resulting in invalid syntax.

 

Where are you setting the value of &pi1?

pwang14
Fluorite | Level 6

I have not put Pi1 in any file, hwo can I write the command if I want set the pi1 into the file that located in the \Users\peng\Downloads\PMLR?

collinelliot
Barite | Level 11

Your code makes reference to a macro variable called "p1." Where you use it in the code, it should resolve the name of a variable in your score data that has the prior probability of an event. I have absolutely no way to know what the name of that variable is, but I think you have a few options.

 

If you know what the variable is supposed to be, you can 1) hard code it so that "priorevent = your_variable" or 2) set p1 to the variable value with "%let p1 = your_variable" above your proc logistic. Alternately you can try just removing the "priorevent=&p1" from your code, but if it was there before, it's likely there for a reason.

pwang14
Fluorite | Level 6

thank you, it is solved by correcting the data path, and the priorevent = &pi doesn't change. 

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!

What is Bayesian Analysis?

Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 4 replies
  • 1030 views
  • 2 likes
  • 2 in conversation