I am looking to create a dialog box (or add to the power dialog box?) for a user-defined program I am creating. There is plenty online about creating dialog boxes for user-defined programs (e.g., https://www.stata.com/manuals13/pdialogprogramming.pdf). However, I have created a custom power calculation method that is called under the power command (see here: https://www.stata.com/support/faqs/s...by-simulation/, which gives an example of how to create your own power calculation method, although the one I'm writing is not for simulation). Is there a way to add this to the power dialog box as an option? I could write it as a program separate from the power command, but then I could not use some of the features of the power command (e.g., allowing for numlists in the options and computing power/sample size across all combinations of numbers listed).
For an example of what I mean, normally you would write something like:
Code:
power twomeans 1 (1.1(0.1)2), power(0.8 0.9) graph
Code:
power powersw, [options]
John
0 Response to Advanced Stata programming question: Dialog box for user-defined power
Post a Comment