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

Innovate_SAS_Blue.png

Registration is open! SAS is returning to Vegas for an AI and analytics experience like no other! Whether you're an executive, manager, end user or SAS partner, SAS Innovate is designed for everyone on your team. Register for just $495 by 12/31/2023.

If you are interested in speaking, there is still time to submit a session idea. More details are posted on the website. 

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.

Get the $99 certification deal.jpg

 

 

Back in the Classroom!

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

View all other training opportunities.

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