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

st: Stata 9, version control, and xtrho


From   "German Rodriguez" <[email protected]>
To   <[email protected]>
Subject   st: Stata 9, version control, and xtrho
Date   Mon, 9 May 2005 17:16:04 -0400

xtrho (Stata Journal 3(1):32-46, 2003) doesn't work in Version 9. (Tip of
the hat to Pierre Kremp for noticing.) The culprit is this line in
xtr_disp.ado:

. local level : set level
invalid syntax

This happens even though the macros have version 7 at the top. In Stata 7 or
8

. local level : set level
. display `level'
95

returns the current confidence level, as documented in the Version 7 manual
(Programming, p. 128 on extended macro functions)

I realize that I can now use

. local level = c(level)

and I have changed the program at http://opr.princeton.edu/stata
accordingly. I have also set the version to 8, as c(level) doesn't work in
Stata 7.

I wondered if this problem would affect all macro extended functions for
accessing Stata system parameters but I don't think this is the case. For
example

. local adosize : set adosize
. display `adosize'
500

Works, as does c(adosize), and this seems to be the case for 12 of the
settings listed in the version 7 manual. The only exception appears to be
level.

This is not the first time version control fails to work as I expected. When
version 8 came out the xtclog command was renamed xtcloglog and as a result
a check for e(cmd) == "xtclog" failed, even under version control. 

The work around that time was to define 

local cmd = e(cmd) 
if "`cmd'" == "xtcloglog" { local cmd = "xtclog" }

making the version 7 code "forward compatible" :)

This time I guess we just need different versions for <= 7 and 8+?

German Rodriguez
Princeton University

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