The NLIN procedure might produce incorrect bootstrap or profiling results when multiple MODEL statements are specified


The BOOTSTRAP statement and PROFILE statement results in PROC NLIN are incorrect when the following conditions are met:

To avoid the problem, rewrite the model using only one MODEL statement.

For example, the following model is specified using two MODEL statements specified in DO groups nested within an IF-THEN/ELSE statement:

if (x < x0) then
do;
   model y = alpha + beta*x + gamma*x*x;
end;
else do;
   model y = alpha + beta*x0 + gamma*x0*x0;
end;

You need to rewrite the above model using a single MODEL statement using one of the following approaches:

if (x < x0) then mean = alpha + beta*x + gamma*x*x;
else mean = alpha + beta*x0 + gamma*x0*x0;
model y = mean;

model y = (x<x0) * (alpha + beta*x +gamma*x*x) + (x>=x0) * (alpha + beta*x0+gamma*x0*x0);