[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

Re: st:

From   Nick Winter <>
Subject   Re: st:
Date   Fri, 15 Feb 2008 14:44:08 -0500

i'll note that -set trace on- act the same way, which means you can turn on tracing at a mid-point in your program (just before the point you are debugging), and Stata will *not* continue to display trace output after the program ends.

This was a change (around Stata 8??).


n j cox wrote:

I would put it differently. You can include

set more off

in a do-file but it doesn't have a persistent effect. It only operates until the end of the do file. This is generic to do files, and beyond. Experiments with something like

* ---------------------------
set more off
* ---------------------------

set obs 1000
do setmoreoff
gen id = _n

will show that the do-file does nothing that persists beyond its own termination. Adding -, permanently- makes no difference to that as far as I can tell. At this moment I don't have access to a manual, so I can't see if the manual says more than the help on this detail.

I surmise that the rationale for this behaviour is that it is more likely to be what you really want than the opposite. -set more off- is usually for here and now, and temporarily. That means, _within_ a program, do file (including code currently in do file editor) or interactive session, but not beyond.


David Jacobs <>

Stata deliberately does not let users alter the set more off command
in the file although I can't remember why.


>I'm using Stata 9 and I made a file so that when Stata opens
>it sets the mem to 500m and sets more off. I see that the little do
>file runs every time Stata opens, but it does not set more off. Does
>anybody have any idea why? Here is what is in the file.
>set more off
>set memory 500m
>and here is how I know it is actually running. This is the message I
>get now whenever I start Stata:
> 1. (/m# option or -set memory-) 10.00 MB allocated to data
> 2. (/v# option or -set maxvar-) 5000 maximum variables
>running C:\Program Files\Stata9\ ...

* For searches and help try:
Nicholas Winter                                 434.924.6994 t
Assistant Professor                             434.924.3359 f
Department of Politics         e
University of Virginia w
PO Box 400787, 100 Cabell Hall
Charlottesville, VA 22904

*   For searches and help try:

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