New Contributor
Posts: 2

# ERROR 388-185: Expecting an arithmetic operator.

Hello,

My below mentioned code runs into an error:

temp1=((1/1-&corr))**0.5)*probit(&PD)+ ((&corr/1-&Corr))**0.5)*probit(0.999));
temp2=CDF('Normal',temp1);
%mend BaselCap;

data resmortgage;
do i=1 to 999;
PD=i/1000;
output;
end;
run;

Regular Contributor
Posts: 156

## Re: ERROR 388-185: Expecting an arithmetic operator.

the problem is likely with this bit of code:

PD=i/1000;

make pd a macro variable

--------------
blog: papersandprograms.com
Super User
Posts: 6,754

## Re: ERROR 388-185: Expecting an arithmetic operator.

You have a mismatch between how you define the macro and how you use it.

For this definition:

you would need to call it in this way:

%BaselCap(pd, 0.50, 1, 0.15)

If you define it using equal signs instead:

then you would need to call it with equal signs:

Note that adding a semicolon at the end of a macro usually won't hurt anything, but isn't necessary.

Posts: 4,736

## Re: ERROR 388-185: Expecting an arithmetic operator.

[ Edited ]

@asifgeneral

You've got your brackets "messed-up" and though the function encounters a closing bracket without a related opening bracket so at this place only an operator would be allowed..

Sorting out the brackets "mess" and things work.

I'm of course not sure if I've set the brackets in below code as you need it logically.

``````%macro BaselCap(PD, LGD, EAD, corr);
temp1=( (1/(1-&corr))**0.5 *probit(&PD)+ ((&corr/1-&Corr))**0.5 *probit(0.999));
temp2=CDF('Normal',temp1);