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 2025: Save the Date

 SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!

Save the date!

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

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