# suest after quantile regression

3 messages
Open this post in threaded view
|
Report Content as Inappropriate

## suest after quantile regression

 Dear all, I want to test the equality of coefficients from two quantile regression models, but -suest- doesn't support after the -qreg-, I wonder whether "stacking" method of Austin Nichols http://www.stata.com/statalist/archive/2009-11/msg01485.html can be applied to this case. That is: the models I want to test are like: est clear sysuse nlsw88, clear qreg wage hours age if south==1, quantile(10) est sto south reg wage hours age if south==0, quantile(10) est sto nonsouth suest south nonsouth however, -suest- doesn't work after -qreg-, so I want to use the "stacking" method as: est clear sysuse nlsw88, clear gen nonsouth=0 replace nonsouth=1 if south==0 expand 2 bys idcode: g n=_n keep if (n==1&south)|(n==2&nonsouth) gen hours1=hours*!(n==1&south) gen hours2=hours*!(n==2&nonsouth) gen age1=age*!(n==1&south) gen age2=age*!(n==2&nonsouth) qreg wage hours1 hours2 age1 age2 n, quantile(10) test (_b[hours1]=_b[hours2]) (_b[age1]=_b[age2]) Is this procedure correct? I am not sure whether there's any problem to use "stacking" method after quantile regression. Any help will be greatly apprecitated. Thanks, Sharon
Open this post in threaded view
|
Report Content as Inappropriate

## Re: suest after quantile regression

 Basically you're trying to test whether the coefficients are the same for two groups, so I think this would work: sysuse nlsw88, clear xi: qreg wage i.south*hours i.south*age, quantile(10) test  _IsouXhours_1=0, notest test  _IsouXage_1=0, accum _______________________ Jorge Eduardo Pérez Pérez On Fri, Aug 27, 2010 at 2:34 PM, xueliansharon <[hidden email]> wrote: > Dear all, > > I want to test the equality of coefficients from two quantile regression > models, but -suest- doesn't support after the -qreg-, I wonder whether > "stacking" method of Austin Nichols > http://www.stata.com/statalist/archive/2009-11/msg01485.html can be applied > to this case. > > That is: > > the models I want to test are like: > > est clear > sysuse nlsw88, clear > qreg wage hours age if south==1, quantile(10) > est sto south > reg wage hours age if south==0, quantile(10) > est sto nonsouth > suest south nonsouth > > however, -suest- doesn't work after -qreg-, so I want to use the "stacking" > method as: > > est clear > sysuse nlsw88, clear > gen nonsouth=0 > replace nonsouth=1 if south==0 > expand 2 > bys idcode: g n=_n > keep if (n==1&south)|(n==2&nonsouth) > gen hours1=hours*!(n==1&south) > gen hours2=hours*!(n==2&nonsouth) > gen age1=age*!(n==1&south) > gen age2=age*!(n==2&nonsouth) > qreg wage hours1 hours2 age1 age2 n, quantile(10) > test (_b[hours1]=_b[hours2]) (_b[age1]=_b[age2]) > > Is this procedure correct? I am not sure whether there's any problem to use > "stacking" method after quantile regression. > > Any help will be greatly apprecitated. > > Thanks, > Sharon > > > > > > -- > View this message in context: http://statalist.1588530.n2.nabble.com/suest-after-quantile-regression-tp5470620p5470620.html> Sent from the Statalist mailing list archive at Nabble.com. > * > *   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/> * *   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/