switching stata output off; saving regression results

Welcome to the forum for runmlwin users. Feel free to post your question about runmlwin here. The Centre for Multilevel Modelling take no responsibility for the accuracy of these posts, we are unable to monitor them closely. Do go ahead and post your question and thank you in advance if you find the time to post any answers!

Go to runmlwin: Running MLwiN from within Stata >> http://www.bristol.ac.uk/cmm/software/runmlwin/
Post Reply
rebvas86
Posts: 11
Joined: Tue Feb 07, 2012 10:32 am

switching stata output off; saving regression results

Post by rebvas86 »

I am trying to run a model (for a 1000 simulated datasets) from STATA with the runmlwin command.

The problem is although I have included the 'no pause' command, I still have to click 'more' on the STATA output for the models to continue running.

Is there any way of switching off the output viewer and simply getting the results (parameter estimates, their CIs, possible the MCMC quantiles, the p-value of the Wald test testing for the significance of each parameter) in an excel sheet or simply as extra columns on the stata file?

I am trying to run the following:
local i=1
while `i'<1001 {
runmlwin V`i' cons, level2 (clid:cons) level1 (serialno:) discrete(distribution(binomial) link(logit) denominator(cons) pql2) nopause
local i=`i'+1
}
ChrisCharlton
Posts: 1354
Joined: Mon Oct 19, 2009 10:34 am

Re: switching stata output off; saving regression results

Post by ChrisCharlton »

You can prevent Stata giving a 'more' prompt with the command:

Code: Select all

set more off
For more information seehttp://www.stata.com/help.cgi?more.

You can turn off the output from runmlwin by either prefixing it with quietly (see http://www.stata.com/help.cgi?quietly), or you can turn off individual parts with the noheader, nogroup, nocontrast, nofetable and noretable runmlwin options.

You can find an example of syntax for running a simulation study using runmlwin on page 34 of the following presentation:

http://www.bristol.ac.uk/cmm/media/runm ... terdam.pdf
rebvas86
Posts: 11
Joined: Tue Feb 07, 2012 10:32 am

Re: switching stata output off; saving regression results

Post by rebvas86 »

Thanks for your comment...I also have managed to get some sort of saved coefficients through the estout command. Though it is not the desired format, I think it will have to do!
GeorgeLeckie
Site Admin
Posts: 432
Joined: Fri Apr 01, 2011 2:14 pm

Re: switching stata output off; saving regression results

Post by GeorgeLeckie »

Hi

I find Stata's more prompt really annoying. You can get rid of it forever

Code: Select all

set more off, permanently
In terms of running a simulation study, the main Stata command is simulate

In the Amsterdam presentation that Chris cites we used the postfile command which I prefer but is less wrapped up. You can do more but it might take longer to get up to speed using it.

George
Post Reply