Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: st: Making vce(robust) the default

From   Stas Kolenikov <[email protected]>
To   [email protected]
Subject   Re: st: Making vce(robust) the default
Date   Fri, 5 Aug 2011 20:09:01 -0500

On Thu, Aug 4, 2011 at 2:20 PM, Richard Williams
<[email protected]> wrote:
> As for checking for the use of svy:, it can be done now in Stata 12. Suppose
> your program is called myprog.ado. Create another program called
> myprog_svy_check.ado. svy: will check to see if this program exists, and if
> it does it will execute it. For example,
> program myprog_svy_check
>         version 12
>         display "svy is being used"
> end
> Maybe I can have it set some global parameter so the program knows svy: is
> being used.

That's a freaking dirty programming trick... or undocumented (and
barely supported) implementation detail, depending on how you view
this. It may be usable at the moment, but it may die off with the next
release, or something. I mean, it's better than nothing, but you would
want to program it very defensively, just for the case that something
gets broken down: (1) your global is set by somebody else; (2) -svy-
decides to call another program; (3) some other unpredictable
circumstances that may cause wrong behavior of your program.

I guess the cleanest solution would be for Stata Corp to set a binary
system value like c(svybeingused), so that the third party code does
not get coupled with something in the guts of Stata.

Stas Kolenikov, also found at
Small print: I use this email account for mailing lists only.

*   For searches and help try:

© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index