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]

From |
Robert Davidson <rhd773@gmail.com> |

To |
statalist@hsphsun2.harvard.edu |

Subject |
Re: st: Quantile Regression |

Date |
Tue, 2 Oct 2012 23:15:37 -0400 |

Thank you for the responses. I am performing the same number of bootstrap replicates in each model and I did not receive any messages that any of the quantiles failed to converge. I will check into setting the same random seed before each command; I did not set anything before running either command so perhaps that is the issue. One thing I should mention is that the standard errors in some cases were dramatically different, not just a little bit off and that is what surprised me given the number of observations I have. I will take a look at Koenker's book as well. It would help a great deal to find a faster way to estimate these models. In case anyone has suggestions based on the model itself, I have a large sample of firm-level stock returns and a series of variables related to the firm's CEO. I am trying to estimate whether certain 'types' of CEOs are over or under represented at different quantiles of stock returns. I can see a pattern by plotting a simple histogram, but want a stronger indicator of the relation and magnitude. Thanks again, Rob On Tue, Oct 2, 2012 at 10:12 PM, JVerkuilen (Gmail) <jvverkuilen@gmail.com> wrote: > On Tue, Oct 2, 2012 at 7:31 PM, Steve Samuels <sjsamuels@gmail.com> wrote: >> >> Without details (see FAQ 3.3 first sentence), we can only guess. This >> could happen if 1) you did not set the same random seed before each >> -sqreg- and -bsqreg- command; 2) the number of bootstrap replicates >> differed between -sqreg- and -bsqreg- runs; or 3) -sqreg- does not >> rejects replicates in which convergence failed for any quantile. > > If the standard errors are different it's no great surprise if you're > running bootstrap. All the stuff said makes sense. Check on a known > dataset (such as auto) and fix the seed. > > > >> By the way, the manual states that -sqreg- is faster than -bsqreg-. > > I believe that computationally there are some speedups due to the fact > that the linear program can be solved for one and simply updated to > get the rest of the quantiles, but I could be mistaken. Roger > Koenker's book (Quantile Regression, Oxford University Press, 2006) > discusses computation in detail. Also there are analytic options to > bootstrapping that might be much faster. -qreg- generates standard > errors analytically using a weighting matrix and density estimator of > the residuals. > > . sysuse auto > . qreg price mpg > > Median regression Number of obs = 74 > Raw sum of deviations 142205 (about 4934) > Min sum of deviations 129521.7 Pseudo R2 = 0.0892 > > ------------------------------------------------------------------------------ > price | Coef. Std. Err. t P>|t| [95% Conf. Interval] > -------------+---------------------------------------------------------------- > mpg | -135.6667 67.26576 -2.02 0.047 -269.7585 -1.574816 > _cons | 8088.667 1483.808 5.45 0.000 5130.749 11046.58 > ------------------------------------------------------------------------------ > > > > > > . bsqreg price mpg, reps(999) *note that bsqreg defaults > to 20!?!?!?! > > Median regression, bootstrap(999) SEs Number of obs = 74 > Raw sum of deviations 142205 (about 4934) > Min sum of deviations 129521.7 Pseudo R2 = 0.0892 > > ------------------------------------------------------------------------------ > price | Coef. Std. Err. t P>|t| [95% Conf. Interval] > -------------+---------------------------------------------------------------- > mpg | -135.6667 35.63527 -3.81 0.000 -206.7043 -64.62906 > _cons | 8088.667 889.0486 9.10 0.000 6316.381 9860.953 > ------------------------------------------------------------------------------ > > > In this case the standard errors are markedly different and playing > with the different methods in -qreg- gives quite different values, but > I don't really know enough to be able to comment on why. I am inclined > to trust the bootstrapped ones because this problem has a rather small > N. > > I suspect that it is very slow on a huge problem though, given that it > needs to sort the residuals. Koenker did a good deal of work on > alternatives such as inverting a test of some sort; I think the R > implementation of quantile regression has this. Again see his book. > > > >> I've never had the luxury of having so many observations to analyze. I >> imagine that almost every simple model can be rejected, so that model >> building and validation are real challenges. > > Randomly subsample and do a real cross validation? > > Jay > -- > JVVerkuilen, PhD > jvverkuilen@gmail.com > > "Out beyond ideas of wrong-doing and right-doing there is a field. > I'll meet you there. When the soul lies down in that grass the world > is too full to talk about." ---Rumi > * > * For searches and help try: > * http://www.stata.com/help.cgi?search > * http://www.stata.com/support/faqs/resources/statalist-faq/ > * http://www.ats.ucla.edu/stat/stata/ * * For searches and help try: * http://www.stata.com/help.cgi?search * http://www.stata.com/support/faqs/resources/statalist-faq/ * http://www.ats.ucla.edu/stat/stata/

**References**:**st: Quantile Regression***From:*Robert Davidson <rhd773@gmail.com>

**Re: st: Quantile Regression***From:*Steve Samuels <sjsamuels@gmail.com>

**Re: st: Quantile Regression***From:*"JVerkuilen (Gmail)" <jvverkuilen@gmail.com>

- Prev by Date:
**Re: st: Transform logit coef and use in -estout- -esttab-** - Next by Date:
**st: FW: SEM** - Previous by thread:
**Re: st: Quantile Regression** - Next by thread:
**Re: st: Quantile Regression** - Index(es):