BookmarkSubscribeRSS Feed
☑ This topic is solved. Need further help from the community? Please sign in and ask a new question.
Stepik
Obsidian | Level 7

Dear team,

 

Can someone explain the next Warning and how it can be resolved inside the PROC FCMP function?

 

N = CDF('NORMALTGAUSS', 1);

R2 = (y*N);

if n='false' and x ne 1 then RA = R2*m;

else...

 

WARNING: The variable 'n' should not be the result of the '=' operation because it is a read-only argument to 'RA'. Any changes
to this argument will not be returned from 'RA'. Use the OUTARGS statement to allow return values.

1 ACCEPTED SOLUTION

Accepted Solutions
FreelanceReinh
Jade | Level 19

Hello @Stepik,

 

Variable names in SAS are case-insensitive, so n and N are the same. Most likely you used n as an argument (more precisely:  a character argument) to function RA in the FUNCTION statement, but then you use N like a numeric variable to store a probability. Just use a different name for this numeric variable.

 

I'm curious where in the documentation you found a 'NORMALTGAUSS' distribution. Is it different from the 'NORMAL' distribution?

 

Hint: It's best practice in the SAS Support Communities to show the entire log of a DATA or PROC step if you get an unexpected note, warning or error. (Use the window opened with the </> button to preserve formatting of the pasted log text.) In this case we would have seen the FUNCTION statement with the argument n.

View solution in original post

2 REPLIES 2
FreelanceReinh
Jade | Level 19

Hello @Stepik,

 

Variable names in SAS are case-insensitive, so n and N are the same. Most likely you used n as an argument (more precisely:  a character argument) to function RA in the FUNCTION statement, but then you use N like a numeric variable to store a probability. Just use a different name for this numeric variable.

 

I'm curious where in the documentation you found a 'NORMALTGAUSS' distribution. Is it different from the 'NORMAL' distribution?

 

Hint: It's best practice in the SAS Support Communities to show the entire log of a DATA or PROC step if you get an unexpected note, warning or error. (Use the window opened with the </> button to preserve formatting of the pasted log text.) In this case we would have seen the FUNCTION statement with the argument n.

Stepik
Obsidian | Level 7

Hi @FreelanceReinh , it is working. Thanks.

It is the same as the normal CDF normal

 

Stepik_0-1687786651205.png

 

hackathon24-white-horiz.png

2025 SAS Hackathon: There is still time!

Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!

Register Now

Creating Custom Steps in SAS Studio

Check out this tutorial series to learn how to build your own steps in SAS Studio.

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
  • 2 replies
  • 727 views
  • 3 likes
  • 2 in conversation