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

 

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

Register now!

SAS Enterprise Guide vs. SAS Studio

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

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

View all other training opportunities.

Discussion stats
  • 2 replies
  • 255 views
  • 3 likes
  • 2 in conversation