Notice: On March 31, it was **announced** that Statalist is moving from an email list to a **forum**. The old list will shut down at the end of May, and its replacement, **statalist.org** is already up and running.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

From |
Maarten buis <maartenbuis@yahoo.co.uk> |

To |
statalist@hsphsun2.harvard.edu |

Subject |
Re: st: equality across quantile regressions WITHOUT sqreg |

Date |
Mon, 27 Sep 2010 14:29:29 +0000 (GMT) |

--- On Mon, 27/9/10, Lim, Raymond wrote: > > If so, would the calculation be the usual "coefficient > > +or- 1.96*SE" and see whether the 95% confidence > > intervals overlap? --- On Mon, 27/9/10, Maarten buis wrote: > Unfortunately no, that method never works. Basically you > are missing the covariance of the joint sampling distribution. To illustrate this point, consider the simulation below. We know that the coefficients of 2.u and 3.u are equal in the popultion, I created the data that way. So, I should reject that hypothesis in 5% of the samples. That is the logic behind a statistical test. As you can see, if I used the appropriate command -test-, I get the right coverage (mean of sig is approx. 0.05, i.e. 5%), but the coverage of the "overlapping confidence intervals test" really misses the nominal 5% mark. *------------------------ begin simulation -------------------- set seed 12345 set more off program drop _all program define sim, rclass drop _all set obs 500 gen u = ceil(3*runiform()) gen y = .5* (u >= 2) + .5*rnormal() reg y i.u local lb_2 = _b[2.u] - invttail(e(df_r),0.025)*_se[2.u] local ub_2 = _b[2.u] + invttail(e(df_r),0.025)*_se[2.u] local lb_3 = _b[3.u] - invttail(e(df_r),0.025)*_se[3.u] local ub_3 = _b[3.u] + invttail(e(df_r),0.025)*_se[3.u] return scalar sig_f = ( `lb_2' > `ub_3' ) | ( `ub_2' < `lb_3' ) test 3.u = 2.u return scalar sig = r(p) < .05 end simulate sig_f=r(sig_f) sig=r(sig), reps(10000) : sim sum *-------------------------- end simulation ---------------------------- Hope this helps, Maarten -------------------------- Maarten L. Buis Institut fuer Soziologie Universitaet Tuebingen Wilhelmstrasse 36 72074 Tuebingen Germany http://www.maartenbuis.nl -------------------------- * * 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/

**References**:**Re: st: equality across quantile regressions WITHOUT sqreg***From:*Maarten buis <maartenbuis@yahoo.co.uk>

- Prev by Date:
**st: Strange results with cluster option** - Next by Date:
**Re: st: equality across quantile regressions WITHOUT sqreg** - Previous by thread:
**Re: st: equality across quantile regressions WITHOUT sqreg** - Next by thread:
**Re: st: equality across quantile regressions WITHOUT sqreg** - Index(es):