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.
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.
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.
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
What’s the difference between SAS Enterprise Guide and SAS Studio? How are they similar? Just ask SAS’ Danny Modlin.
Find more tutorials on the SAS Users YouTube channel.