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

Re: st: Running do files one line at a time


From   Ulrich Kohler <[email protected]>
To   [email protected]
Subject   Re: st: Running do files one line at a time
Date   Wed, 19 Jun 2002 11:07:15 +0000

> I'm using Stata to demonstrate some points in a lecture - doing graphs,
> regressions, t-tests etc. 'live' so to speak. I'm not sufficiently
> fluent with Stata to write it on the fly, especially for graphics commands.
>
> What I would like to do is to prepare a do file in advance, and step
> through it, execute it, one line (or one statement) at a time. I can't
> see any obvious way to do this in Stata.
>
> I'm sure the answer is very obvious, but I am failing to see it!

you can use -more- after each command. -more- will causes Stata to stop until 
you press any key. 

For example:

use auto, clear
describe
more

graph mpg weight, border
more

gen weight2 = weight^2
regress mpg weihght weight2
more

predict yhat
graph mpg yhat weight, border c(.l) s(oi) ylab xlab
more

-- 
[email protected]
http://www.sowi.uni-mannheim.de/lesas

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