[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

Re: st: User-written commands and vce() support

From (Jeff Pitblado, StataCorp LP)
Subject   Re: st: User-written commands and vce() support
Date   Wed, 11 Jun 2008 23:23:37 -0500

Richard Williams <> tried out the -_vce_parserun-
code I suggested and had some follow-up questions/comments:

> >There is an "undocumented" programmers utility that parses the -vce()- option
> >for the replication based VCE methods.  The "undocumentation" for this parse
> >utility is available within Stata:
> >
> >         . help _vce_parserun
> Thanks much.  It works!  I am not 100% sure why it works, but it 
> works.  However, if I am following this right, it appears that if you 
> type something like
> oglm y x1 x2, vce(bootstrap)
> the code Jeff provided changes the command to
> bootstrap: oglm y x1 x2
> Which, I suppose, the user could have gone ahead and typed in the 
> first place, but the help for the -bootstrap- command says it is 
> better to use the vce(bootstrap) option if a command supports it.

We put this recommendation in the documentation for -bootstrap- (and
-jackknife-) because there some commands such as -clogit- that require the
user to think carefully about the -cluster()- and -idcluster()- (and even the
-group()-) options of -bootstrap- prefix command in order to properly resample
the data.  However we were careful to make sure that -clogit- with the
-vce(bootstrap)- option handles all those details for you.

Commands like -ologit-, -piosson-, and Richards' -oglm- work with -bootstrap-

> If anyone else wants to adapt this for their own purposes - Jeff's 
> code includes
> >         `BY' _vce_parserun oglm, mark(  Exposure                ///
> >                                         OFFset                  ///
> >                                         CLuster                 ///
> >                                         HETero                  ///
> >                                         SCALE                   ///
> >                                         eq2) : `0'
> I didn't see the -mark- option documented, but when I did -help 
> _eqlist- I found
>      markopts(opt_name)    options taking a varlist that should be 
> marked for the estimation sample

Option -markopts()- (abbreviated -mark()-) is an option of a member function
of the -_eqlist- class (another "undocumented" Stata programmers tool).
-_vce_parserun- uses -_eqlist- to parse `0' in the above example Stata code.

> One followup question:  If you type
> help ml##model_options
> It says
> vce(vcetype)  vcetype may be robust, cluster clustvar, oim, opg, 
> bootstrap, or jackknife
> Is this correct?  I actually tried hardcoding vce(bootstrap) into my 
> program and it still said bootstrap was an illegal option.  If the 
> above is correct, why is the extra code needed?

Sorry Richard, this is not correct.

-ml- does not allow -vce(bootstrap)- or -vce(jackknife)-.
We'll fix the help file for -ml- in a future ado-file update.

*   For searches and help try:

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