# st: Re: regression on quartiles

 From "Michael Blasnik" To Subject st: Re: regression on quartiles Date Sun, 16 May 2004 12:33:50 -0400

```I don't think that this is an appropriate use of sureg.  I thought that
sureg (and similarly mvreg) are both based on the assumption that the error
terms may be correlated across equations (typically these are
contemporaneous correlations).  In this case, the four sets of Ys and Xs in
a given observation are arbitrarily in the same observation (since the data
are simply divided by quartiles on another variables) -- there is no
contemporaneous association or any other reason why the data pair for any
quartiles are aligned in the particular observations they appear and no
reason to think that the residuals across equations have anything to do with
one another.

I believe the original post was interested in variations in the estimated
coefficient for X across quartiles of Z, which would be more appropriately
estimated by some dummy variable OLS approach (which could include separate
slopes and/or intercepts depending on the hypothesisi one wished to test).
One might also look at treating the quartiles as panels and using xtrchh2
,which provides a test for parameter constancy across panels.

Michael Blasnik
michael.blasnik@verizon.net

----- Original Message -----
From: "Christopher F Baum" <baum@bc.edu>
To: <statalist@hsphsun2.harvard.edu>
Sent: Saturday, May 15, 2004 9:17 AM
Subject: st: regression on quartiles

>
> There are two approaches that one could follow here. Michael's
> suggestion implies a linear regression model  in which there is a
> single intercept term and four different slopes (one for each
> quartile). Since the number of observations are equal (assuming
> mod(N,4)=0) in each quartile, Daniela could reshape the data wide by
> quart, and then run sureg on the four different "equations": eqn_i
> contains the Y and X from quartile i, etc. In the SUR context, one can
> then test that the slopes are equal across equations. This model would
> allow for different slopes, intercepts, and sigma^2 for each quartile.
> An intermediate form would be to follow Michael's suggestion and allow
> for quartile-specific intercepts; that form still assumes that the
> errors are homoskedastic across quartiles.
>
> Kit

> >
> > I don't think sureg is what you want -- sureg is used for models
> > estimated
> > on the same sample.  What you want is more like a Chow test or,
> > preferably,
> > just create interaction terms on the slope (and/or intercept).  This
> > latter
> > approach can be done for you by xi.  For example, if you create zquart
> > to
> > hold the quartiles of Z, then you could
> >
> > xi: reg Y X i.zquart*X
> >
> >
> > and then look at the significance of the _I terms and perform tests on
> > them
> >
> >
> > Michael Blasnik
> > michael.blasnik@verizon.net
> >
> >
> > ----- Original Message -----
> > From: "Vuri, Daniela" <Daniela.Vuri@iue.it>
> > To: <statalist@hsphsun2.harvard.edu>
> > Sent: Thursday, May 13, 2004 4:43 AM
> > Subject: st: compare coefficients after sureg
> >
> >
> > > Dear Stata users,
> > > I have the following problem.
> > > I have a regression of Y on X and Z and I want to see if the effect
> > of Z
> > is different across quartile of Z.
> > > I do the following:
> > >
> > > gen quart=1 if Z is in the first quartile
> > > replace quart=2 if Z is in the second quartile
> > > replace quart=3 if Z is in the third quartile
> > > replace quart=4 if Z is in the fourth quartile
> > >
> > > and then I do the following
> > >
> > > bysort quart: sureg(Y X)
> > >
> > > at this point I would like to test whether the beta coefficient I
> > get in
> > the first equation (the first quartile) is equal to the beta
> > coefficient I
> > get in the second equation (the second quartile) and so on.
> > >
> > > Is sureg the right command?  and how can I get the test of equality
> > of the
> > coefficients across quartiles?
> > >
> > > thanks
> > > daniela

*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/
```