Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.
From | Richard Williams <richardwilliams.ndu@gmail.com> |
To | statalist@hsphsun2.harvard.edu |
Subject | Re: st: Making vce(robust) the default |
Date | Thu, 04 Aug 2011 14:20:42 -0500 |
At 11:38 AM 8/4/2011, Stas Kolenikov wrote:
I guess that if you are concerned with a particular standard option of Stata, you'd still want to parse the inputs from the user yourself: syntax ... , [vce(passthru) robust cluster(passthru)] * with appropriate capitalization per Stata conventions if "`vce'`robust'`cluster'" == "" local vce vce(robust) ml ... , ... maximize `vce' `robust' `cluster' This should digest the user-provided -vce- option and its variants. You'd have to ask Jeff P if there is any way to figure out whether a program is called by -svy-. As long as this is a very deep technicality that is dependent on the particular implementation/version of -svy-, subject to change without notice, there may no be such an official way. My understanding though is that for the linearization estimator, -svy- is going to call -predict, score- when computing the standard errors, so it may not matter that much whether you enforce -robust- for maximization purposes.
Thanks Stas. I was thinking the bootstrap and jackknife prefixes might also be problems, but it looks like they don't care what you have specified for vce (and Stata seems to discourage the use of those prefixes anyway, preferring that you use vce() ). So, maybe this isn't as hard as I thought. Doing a quick check, svy: does seem to have problems if your program internally specifies vce(robust).
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" endMaybe I can have it set some global parameter so the program knows svy: is being used.
------------------------------------------- Richard Williams, Notre Dame Dept of Sociology OFFICE: (574)631-6668, (574)631-6463 HOME: (574)289-5227 EMAIL: Richard.A.Williams.5@ND.Edu WWW: http://www.nd.edu/~rwilliam * * For searches and help try: * http://www.stata.com/help.cgi?search * http://www.stata.com/support/statalist/faq * http://www.ats.ucla.edu/stat/stata/