Quantcast
Channel: Statalist
Viewing all articles
Browse latest Browse all 72762

Importing C code in Stata and Nonlinear optimization

$
0
0
Dear Statalist,

I am trying to import some C code from the NLopt library (http://ab-initio.mit.edu/wiki/index.php/NLopt) into Stata.
I followed this tutorial (http://www.stata.com/plugins/) to create the dll library containing the files stplugin.h, stplugin.c, and myfile.c.

I managed to run without errors:

program nlopt, plugin using("C:\ado\personal\nlopt.dll")


Nonetheless, i got the error r(9998) once i try to call the plugin:

. plugin call nlopt1
r(9998);

end of do-file


Any idea how to make this work?
I tried to run the example hello.c and it works smoothly.

Thank you very much in advance,

MS


p.s if anyone knows a Stata command for nonlinear optimization (specifically sequential quadratic programming) please let me know! :D

Viewing all articles
Browse latest Browse all 72762

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>