Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: RE: A dialog box to perform simulations.


From   "Nick Cox" <[email protected]>
To   <[email protected]>
Subject   st: RE: A dialog box to perform simulations.
Date   Wed, 4 Jan 2006 20:49:33 -0000

No doubt you could use a dialog to do this, 
but it doesn't strike me as the easiest approach. 

Be aware that -display- has a very simple interactive
handle that could well be adequate here, namely
-_request()-. 

To the question how do you design an interactive
program in Stata, my answer is to design a syntax
that you want to use! 

Nick 
[email protected] 

[email protected]
 
> 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
> 
> predict yhat2.
> 
> 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).

*
*   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/



© Copyright 1996–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index