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

. local level : set level
invalid syntax

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

. local level : set level
. display `level'

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

. local adosize : set adosize
. display `adosize'

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

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:

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