Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: st: Making vce(robust) the default
From
Richard Williams <[email protected]>
To
[email protected], [email protected]
Subject
Re: st: Making vce(robust) the default
Date
Thu, 04 Aug 2011 16:49:13 -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'
Thanks to Stas & Billy for their suggestions. Here is my current
workaround. First, I have a program called myprog_svy_check.ado.
program myprog_svy_check
version 12
global svyused "svyused"
end
Then, within myprog.ado, I have added this code:
// Make vce(robust) the default if not otherwise specified
if "`vce'`robust'`cluster'$svyused" == "" local vce vce(robust)
macro drop svyused
Hopefully that covers all the possibilities, and does not have any
unintended consequences. (I could just tell users that they will
usually want to specify vce(robust), but I would prefer to just set
the default to what should be the most common choice given the method
being used).
-------------------------------------------
Richard Williams, Notre Dame Dept of Sociology
OFFICE: (574)631-6668, (574)631-6463
HOME: (574)289-5227
EMAIL: [email protected]
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/