Bookmark and Share

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]

Re: st: suest after quantile regression


From   Jorge Eduardo Pérez Pérez <perez.jorge@ur.edu.co>
To   "statalist@hsphsun2.harvard.edu" <statalist@hsphsun2.harvard.edu>
Subject   Re: st: suest after quantile regression
Date   Fri, 27 Aug 2010 18:59:47 -0400

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 <xuelianstata@gmail.com> 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/


© Copyright 1996–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index