BookmarkSubscribeRSS Feed
mezerji
Calcite | Level 5

Hi,

 

I am running on a 64-bit version of SAS 9.4 from a remote system. I received these error messages:

 

ERROR: Invalid Operation.

ERROR: Termination due to Floating Point Exception

 

when trying to run the code below in 1000 simulation and after about 50 run.

 

proc nlmixed data=analysis_&sim ;
parms a0=0 a1=0 a2=0 b0=0 b1=0 b2=0 tau=0 sigma=1 sigma1=1 sigma2=1 nu=1;
bounds sigma>0, sigma1>0, sigma2>0, nu>0;
eta_zero_m=a0+a1*x1+a2*x2+z1;
p_zero_m=exp(eta_zero_m)/(1+exp(eta_zero_m)); /* probability y > 0 */
eta_cont_m=b0+x1*b1+b2*x2+z2;
mu_cont_m=exp(eta_cont_m);
delta_cont=eta_cont_m - (sigma**2/2);
mu_cont_p=exp(delta_cont);
if y=0 then ll=log(p_zero_m);
else ll=log(1-p_zero_m)+log(y)*(mu_cont_p*(1+nu)-1)-(mu_cont_p*(1+nu)+nu+2)*log(1+y) lgamma(mu_cont_p*(1+nu))
-lgamma(nu+2)+lgamma(mu_cont_p*(1+nu)+nu+2);
model y~general(ll);
random z1 z2 ~ normal([0,0],[sigma1**2,tau*sigma1*sigma2,sigma2**2])
subject=idnum;
ods output ParameterEstimates=estTT_&sim ConvergenceStatus=ConvergTT_&sim FitStatistics=FitTT_∼
run;
data matrix_TT;
set estTT_:;
output;
data conv_TT;
set ConvergTT_:;
output;
data fit_TT;
set FitTT_:;
output;
run;

2 REPLIES 2
StatsMan
SAS Super FREQ

I would open a ticket with SAS Tech Support for this one. You can reach them through email (support@sas.com) or through the web (support.sas.com). Better to use those methods than the phone for a complicated problem like this ...

Rick_SAS
SAS Super FREQ

You can use

%PUT &=SIM;

inside the macro loop so that you can find out which simulated data set is failing. Then you can use a WHERE clause to  examine the data and try to run the PROC NLMIXED code just on that subset.

 

One possibility is that either eta_zero_m or eta_cont_m is too large (greater than 709) so that EXP() overflows.

SAS Innovate 2025: Save the Date

 SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!

Save the date!

What is ANOVA?

ANOVA, or Analysis Of Variance, is used to compare the averages or means of two or more populations to better understand how they differ. Watch this tutorial for more.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 2 replies
  • 3232 views
  • 1 like
  • 3 in conversation