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

st: Tracedepth and tracenumbering


From   "Peter Jepsen" <[email protected]>
To   <[email protected]>
Subject   st: Tracedepth and tracenumbering
Date   Mon, 11 Jul 2005 16:49:44 +0200

Dear Statalisters,

I am experiencing some unexpected behaviour from my fully updated Stata 9
running on Windows XP. I wonder if anyone can confirm the following. It's
about this simple program:

clear
sysuse auto
set tracedepth 1
set tracenumber on
set trace on
logistic foreign headroom

If I -do- the program from the do-file editor, I get this result:
 
----------------------------------------------------------------------------
------------------------------------------------------ begin logistic ---
02   - version 6.0, missing
02   - local version : di "version " string(_caller()) ", missing :"
02   - if _by() {
02     local BY `"by `_byvars'`_byrc0':"'
02     }
02   - `version' `BY' _vce_parserun logistic : `0'
     = version 9, missing :  _vce_parserun logistic : foreign headroom
02   - if "`s(exit)'" != "" {
     = if "" != "" {
02     exit
02     }
02   - if replay() {
02     if `"`e(cmd)'"'~=`"logistic"' { error 301 }
02     if _by() { error 190 }
02     Display `0'
02     exit
02     }
02   - quietly syntax [anything] [if] [in] [fw iw pw aw] [, * ]
02   - `version' `BY' Estimate `0'
     = version 9, missing :  Estimate foreign headroom

Logistic regression                               Number of obs   =
74
                                                  LR chi2(1)      =
6.72
                                                  Prob > chi2     =
0.0095
Log likelihood = -41.671379                       Pseudo R2       =
0.0747

----------------------------------------------------------------------------
--
     foreign | Odds Ratio   Std. Err.      z    P>|z|     [95% Conf.
Interval]
-------------+--------------------------------------------------------------
--
    headroom |   .4304066   .1490467    -2.43   0.015     .2183303
.8484845
----------------------------------------------------------------------------
--
 
----------------------------------------------------------------------------
-------------------------------------------------------- end logistic ---


If, on the other hand, I copy and paste the lines into the command window, I
get this (which is what I expected):

----------------------------------------------------------------------------
-------------------------------------------------------- begin logistic ---
01 - version 6.0, missing
01 - local version : di "version " string(_caller()) ", missing :"
01 - if _by() {
01   local BY `"by `_byvars'`_byrc0':"'
01   }
01 - `version' `BY' _vce_parserun logistic : `0'
   = version 9, missing :  _vce_parserun logistic : foreign headroom
01 - if "`s(exit)'" != "" {
   = if "" != "" {
01   exit
01   }
01 - if replay() {
01   if `"`e(cmd)'"'~=`"logistic"' { error 301 }
01   if _by() { error 190 }
01   Display `0'
01   exit
01   }
01 - quietly syntax [anything] [if] [in] [fw iw pw aw] [, * ]
01 - `version' `BY' Estimate `0'
   = version 9, missing :  Estimate foreign headroom

Logistic regression                               Number of obs   =
74
                                                  LR chi2(1)      =
6.72
                                                  Prob > chi2     =
0.0095
Log likelihood = -41.671379                       Pseudo R2       =
0.0747

----------------------------------------------------------------------------
--
     foreign | Odds Ratio   Std. Err.      z    P>|z|     [95% Conf.
Interval]
-------------+--------------------------------------------------------------
--
    headroom |   .4304066   .1490467    -2.43   0.015     .2183303
.8484845
----------------------------------------------------------------------------
--
 
----------------------------------------------------------------------------
---------------------------------------------------------- end logistic ---

These two outputs are similar except from the numbering and tabbing, I'd
say. 

If, in the do-file editor, I change -set tracedepth 1- to -set tracedepth
3-, the tracenumbers will range from 2 to 4. If I do the same from the
command window, I get the expected range of 1 to 3.

I'm guessing that there is something odd going on with the tracenumbering.

Best regards,

Peter.

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