Wednesday, January 04, 2006
st: A dialog box to perform simulations.
Hi stata folks and happy new year.
I have two questions:
1. How to design a framework (possibly through a dialog box - though I am totally novice to dialogs - ) to make simulations, after a regression? What I have in mind is something like:
regress yvar xvar1 xvar2 predict yhat1
Now allow user to make simulations:
- replace xvar1 or xvar2 or both by some values
I am trying to do that with VB under excel (using streg results), but not only it is boring, I am sure it is doable in stata.
2. More generally, how to design an interractive program in stata (in the sense that during the course of the program, it receives inputs - arguments- from the user and implement results). Something like the cin/cout commands in C++. Again possibly through a dialog box (such as a box to compute the square root of a number). But it can also be a stand alone program. Something like:
myprogram // in the stata command line
enter a value // stata prompts a request
5 // user enters value
2.236068 // stata outputs an answer
enter a new value or type "exit" to exit // stata prompts a new request
exit // end session
Again, I think I have to invest a lot in dialog programming, but I want to know if definitely, this is doable in stata (especially my first question).
Amadou. * * For searches and help try: * http://www.stata.com/support/faqs/res/findit.html * http://www.stata.com/support/statalist/faq * http://www.ats.ucla.edu/stat/stata/
Links to this post: