Bookmark and Share

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]

st: STATA MODULE UPDATE: grqreg


From   JP Azevedo <[email protected]>
To   [email protected]
Subject   st: STATA MODULE UPDATE: grqreg
Date   Thu, 17 Mar 2011 21:41:02 -0400

Thanks to Kit Baum and Jeff Grogger, a new version of grqreg is now
available for download from SSC.

After some digging I finally identified and fixed the problem. the
main issue was how Stata handle the boostrap command of bsqreg and
sqreg. The point estimates were always correct, but the problem was
the inference.

After an exchange with Stata corp I found out that : -bsqreg- and
-sqreg- have different standard errors (same initial seed,
replications, and quantile) because the two commands use different
methods to generate bootstrap sample.

Both commands calculate the bootstrap standard errors manually instead
of using the official     -bootstrap- prefix command.  The -bsqreg-
command uses -bsample- to take each of the bootstrap     samples.  On
the other hand, -sqreg- uses the undocumented -bsampl_w-     command.
 Both commands are logically equivalent, but because they use
different algorithms, they will not create the same bootstrap sample
when used with the same seed.

A new version of grqreg is now available for download from SSC. among
the main differences is the possibility of fixing the seed value, and
setting the number of replications for the boostrap inference when
using bsqreg and sqreg....

to download from SSC, please type:

ssc install grqreg, replace

to test the new procedures, please type:

**********************

webuse auto, clear
set seed 121
sqreg price mpg headroom, q(.25 0.50 .75) reps(100)
grqreg, ci quantile(.25 0.50 .75) list reps(100) seed(121)

*********************

webuse auto, clear
set seed 121
bsqreg price mpg headroom, reps(100)
grqreg, ci qmin(.25) qmax(.75) qstep(.25) list seed(121) reps(100)

*********************

webuse auto, clear
set seed 121
qreg price mpg headroom
grqreg, ci qmin(.25) qmax(.75) qstep(.25) list

*********************

As usual comments and suggestions are most welcomed.

Best,

JP
*
*   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/


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