Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: st: Benchmarks for Stata
From
Austin Nichols <[email protected]>
To
[email protected]
Subject
Re: st: Benchmarks for Stata
Date
Fri, 10 Dec 2010 12:20:05 -0500
Dimitriy V. Masterov <[email protected]>:
I don't know why you are getting that error message, but you seem to
have misunderstood the point of the example code--it writes out a do
file and then starts Stata in batch mode, which you do not want to do
in your do file! It was intended only as an example that can be run
interactively. Your do file should read
sysuse nlsw88, clear
set rmsg on
set seed 1
bs, r(50000): logit married grade south wage
exit
without all that other stuff, and then you should run that in batch
mode as appropriate on your system. With Window's, click on the Start
menu, click Run.. and then type:
"C:\Program Files (x86)\Stata11\StataMP" -b do /batch
(if the above is saved as \batch.do).
But try first:
sysuse nlsw88, clear
set rmsg on
set seed 1
bs, r(5): logit married grade south wage
exit
to make sure it runs, and you can open the log file, and you
understand the idea.
On Fri, Dec 10, 2010 at 12:08 PM, Dimitriy V. Masterov
<[email protected]> wrote:
> I had to tweak Austin's code since I do not have permission to write
> to sysdir (code and output below), but I am now getting an error:
> c(showbaselevels) undefined. This error only happens in batch mode. I
> can estimate the logit by hand without any problems.
>
> I forced Stata to update the executable and the utilities as was
> suggested on a previous thread, and I made sure to conduct the swap.
> Stata looks up to date:
>
> . update query
> (contacting http://www.stata.com)
>
> Stata executable
> folder: C:\Program Files (x86)\Stata11\
> name of file: StataMP-64.exe
> currently installed: 04 Nov 2010
> latest available: 04 Nov 2010
>
> Ado-file updates
> folder: C:\Program Files (x86)\Stata11\ado\updates\
> names of files: (various)
> currently installed: 10 Nov 2010
> latest available: 10 Nov 2010
>
> Utilities updates
> folder: C:\Program Files (x86)\Stata11\utilities
> names of files: (various)
> currently installed: 01 Sep 2010
> latest available: 01 Sep 2010
>
> Recommendation
> Do nothing; all files up to date.
>
>
>
> Here's my version of Austin's code:
>
> #delimit;
> set more off;
> clear all;
>
> cd "C:\Users\masterd\Documents"; // don't have permissions, so changed dirs.
> tempname t;
> file open `t' using batch.do, write replace; // added replace
> file write `t' "sysuse nlsw88, clear" _n;
> file write `t' "set rmsg on" _n;
> file write `t' "set seed 1" _n;
> file write `t' "bs, r(50000): logit married grade south wage" _n;
> file write `t' "exit" _n;
> file close `t';
> ! "C:\Program Files (x86)\Stata11\StataMP" -b do batch; // changed
> Stata MP to path
> erase batch.do;
> type batch.log;
> erase batch.log;
>
*
* For searches and help try:
* http://www.stata.com/help.cgi?search
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/