Statalist


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

Re: st: profile.do


From   Nick Winter <nwinter@virginia.edu>
To   statalist@hsphsun2.harvard.edu
Subject   Re: st: profile.do
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??).

--NW

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

* --------------------------- setmoreoff.do
set more off
* ---------------------------

clear
set obs 1000
do setmoreoff
gen id = _n
l

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.

Nick
n.j.cox@durham.ac.uk

David Jacobs <jacobs.184@sociology.osu.edu>

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

Dave

>I'm using Stata 9 and I made a profile.do 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 profile.do 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:
>Notes:
> 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\profile.do ...

*
* 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/
--
--------------------------------------------------------------
Nicholas Winter                                 434.924.6994 t
Assistant Professor                             434.924.3359 f
Department of Politics                  nwinter@virginia.edu e
University of Virginia          faculty.virginia.edu/nwinter w
PO Box 400787, 100 Cabell Hall
Charlottesville, VA 22904

*
*   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–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index