BookmarkSubscribeRSS Feed
raulroy
Calcite | Level 5

Attached is the output from one optimization using NPLMNS, it turns out that the objective function stops changing beyond iteration 10. from iteration 10 to iteration 300, the output keeps showing -66205. The objective function change keeps showing 0.00813. Similarly the simplex size also attenuates.

 

Seems like its unnecessarily calling iterating without any improvement. How can I handle this?

3 REPLIES 3
Rick_SAS
SAS Super FREQ

If you want to accept that parameter value as the optimal value, you can adjust the termination criteria that is used for the Nelder-Mead algorithm. The SAS/IML documentation describes the various ways that the N-M simplex algorithm terminates.

You can use the TC= option to specify the values for each termination criteria.  For example, if you want to limit the number of function evaluations to 1000 (instead of the default, 3000), you can use:

 

tct = j(10, 1, .);

tc[2] = 1000;

call NLPNMS( ... ) TC=tc;

 

Other termination criteria are specified in a similar manner.

raulroy
Calcite | Level 5
Yes I did that, but I also want to understand what is going on to generate
the kind of iteration that I am seeing here. Thanks.
Rick_SAS
SAS Super FREQ

You can use the iteration history of the solution to plot the trajectory from the initial guess. For an example, see "Optimization with nonlinear constraints in SAS." 

 

If you are fitting parameters of a model to data (for example, maximum likelihood optimization), this behavior often indicates that the model does not fit the data and the likelihood function is very flat. It can indicate a misspecified model or a sample size that is too small.

SAS Innovate 2025: Register Now

Registration is now open for SAS Innovate 2025 , our biggest and most exciting global event of the year! Join us in Orlando, FL, May 6-9.
Sign up by Dec. 31 to get the 2024 rate of just $495.
Register now!

Multiple Linear Regression in SAS

Learn how to run multiple linear regression models with and without interactions, presented by SAS user Alex Chaplin.

Find more tutorials on the SAS Users YouTube channel.

From The DO Loop
Want more? Visit our blog for more articles like these.
Discussion stats
  • 3 replies
  • 990 views
  • 0 likes
  • 2 in conversation