Thank you very much for your patience and quick response. I was able to download the macro and make it available to use as you said. However , i still need to figure out what to put in below part as my model has multiple variables. If you have any resources for that, that will be great help. Thanks in advance. Risk neverexposed=1,1/(1+exp(-(B_p1+0.5*B_p2+0.5*B_p3+B_p5))) Risk neverexposed=0,1/(1+exp(-(B_p1+0.5*B_p2+0.5*B_p3+B_p4))) Attributable Risk,( 1/(1+exp(-(B_p1+0.5*B_p2+0.5*B_p3+B_p5)))-1/(1+exp(-(B_p1+0.5*B_p2+0.5*B_p3+B_p4))) ) / ( 1/(1+exp(-(B_p1+0.5*B_p2+0.5*B_p3+B_p5))) ) %inc "C:\Users\khetap03\Desktop\three\nlestimate.sas"; proc logistic data=red.merged3; class studyname ageq sex Education_levelmi1 race region drink_dayq tobaccoyearq neverexposed/ param=glm; model case= studyname ageq sex Education_levelmi1 race region drink_dayq tobaccoyearq neverexposed; lsmeans studyname ageq sex Education_levelmi1 race region drink_dayq tobaccoyearq / e ilink diff exp; store out=log; run; data fd; length label f $32767; infile datalines delimiter=','; input label f; datalines; Risk neverexposed=1,1/(1+exp(-(B_p1+0.5*B_p2+0.5*B_p3+B_p5))) Risk neverexposed=0,1/(1+exp(-(B_p1+0.5*B_p2+0.5*B_p3+B_p4))) Attributable Risk,( 1/(1+exp(-(B_p1+0.5*B_p2+0.5*B_p3+B_p5)))-1/(1+exp(-(B_p1+0.5*B_p2+0.5*B_p3+B_p4))) ) / ( 1/(1+exp(-(B_p1+0.5*B_p2+0.5*B_p3+B_p5))) ) ; %NLEstimate( instore=log, fdata=fd )
... View more