Help using Base SAS procedures

proc logistic score

Accepted Solution Solved
Reply
Occasional Contributor
Posts: 5
Accepted Solution

proc logistic score

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

Accepted Solutions
Solution
‎04-24-2017 04:56 PM
PROC Star
Posts: 290

Re: proc logistic score

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


All Replies
PROC Star
Posts: 290

Re: proc logistic score

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

 

Where are you setting the value of &pi1?

Occasional Contributor
Posts: 5

Re: proc logistic score

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?

Solution
‎04-24-2017 04:56 PM
PROC Star
Posts: 290

Re: proc logistic score

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.

Occasional Contributor
Posts: 5

Re: proc logistic score

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

☑ This topic is solved.

Need further help from the community? Please ask a new question.

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