BookmarkSubscribeRSS Feed
☑ This topic is solved. Need further help from the community? Please sign in and ask a new question.
rakeshallu
Obsidian | Level 7

Dear all, 

 

I know several variants of the following question have been asked before. However, I am still unable to incorporate the advice to my problem. Hence re-posting. I am running NLPNRA in a loop and would like to store the estimates and gradients in each iteration in a SAS dataset. The code that is being looped looks somewhat like this -

ods output ParameterEstimates = mle;
proc iml;
[OBJECTIVE FUNCTION]
quit; 

 When I run this code 1000 times in a loop, I see 1,000 HTML files created in my SAS Temporary Files directory. This chokes up my workspace and the subsequent iterations tend to take longer.  My question is - how do I recover the file "mle" dataset in the code and delete the html file generated in the temporary files directory? 

 

I tried the following and the HTML files continue to be generated in all the attempts: 

  1. Add 'ods exclude all' and 'ods exclude none' before and after proc iml
  2. Add 'ods noresults' and 'ods results'
  3. Add dm 'odsresults; clear'; after executing proc iml
  4. Add 'ods _all_ close' before executing proc iml

Any suggestions would be great. 

 

Thank you, 

Rakesh

1 ACCEPTED SOLUTION

Accepted Solutions
Rick_SAS
SAS Super FREQ

Are you sure you need ODS OUTPUT at all? The NLPNRA subroutine returns the parameter estimates.  I suspect you can follow the example in the article, "Solve many optimization problems."

 

If that doesn't answer your question, explain what you are doing, and show your program. Specifically, the loop and the call to NLPNRA.

 

 

View solution in original post

2 REPLIES 2
Rick_SAS
SAS Super FREQ

Are you sure you need ODS OUTPUT at all? The NLPNRA subroutine returns the parameter estimates.  I suspect you can follow the example in the article, "Solve many optimization problems."

 

If that doesn't answer your question, explain what you are doing, and show your program. Specifically, the loop and the call to NLPNRA.

 

 

rakeshallu
Obsidian | Level 7

This is exactly what I needed. Thank you, Rick!

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

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
  • 2 replies
  • 753 views
  • 1 like
  • 2 in conversation