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]

st: AW: problem with grqreg after qreg


From   "Martin Weiss" <martin.weiss1@gmx.de>
To   <statalist@hsphsun2.harvard.edu>
Subject   st: AW: problem with grqreg after qreg
Date   Thu, 1 Jul 2010 17:45:40 +0200

<> 


" Then does it mean
that grqreg will yield the same graph no matter it is run after 0.1 or 0.2
quantile regression?"


Easy to find out:


*************
webuse auto, clear

qui forv i=1(2)9{
	qreg price weight length turn foreign, q( `=`i'/10')
	grqreg weight, ci ols olsci name(mygr`i', replace)
}

gr combine mygr1 mygr3 mygr5 mygr7 mygr9
*************

So the answer is "Yes", and any -qreg- run immediately before the -grqreg-
call is apparently sufficient. BTW, the command is user-written from -ssc-.





HTH
Martin


-----Ursprüngliche Nachricht-----
Von: owner-statalist@hsphsun2.harvard.edu
[mailto:owner-statalist@hsphsun2.harvard.edu] Im Auftrag von xueliansharon
Gesendet: Donnerstag, 1. Juli 2010 17:25
An: statalist@hsphsun2.harvard.edu
Betreff: st: problem with grqreg after qreg

Hi all,

In the following code, when I run grqreg after qreg, why do I get a curve
instead of a point in this graph (say graph 1)? grqreg should plot the
coefficient before weight for 0.5 quantile regression in my codes, which
should be a point 3.933588 in the graph, so why does grqreg retrun a curve? 

The following are my codes:

webuse auto, clear
qreg price weight length turn foreign, quantile(0.5)
grqreg weight, ci ols olsci

Also, I check the coefficients of weight when running qreg for quantile 0.1,
0.2,0.3,...,0.9 respectively, and it seems like the coefficients before
weight for each quantile regression are the same to the value in the graph1
(graph 1 is gotten by running grqreg after 0.5 quantile regression), that
is, the coefficient before weight for 0.1 quantile regression is the same to
the value in graph 1 for quantile 0.1,  is this correct? Then does it mean
that grqreg will yield the same graph no matter it is run after 0.1 or 0.2
quantile regression? 

So if I want to get a graph showing all the coefficients before weight for
quantile 0.1,0.2,...,0.9 regression, should I just employ the graph plotted
after quantile 0.5 (or 0.1 or any quantile) regression? Or should I employ
the following codes?

webuse auto, clear
set seed 10101
sqreg price weight length foreign, quantile(0.1, 0.2, 0.25, 0.3, 0.4, 0.5,
0.6, 0.7, 0.75,0.8,0.9) reps(100)
grqreg weight, ci ols olsci

Hope to get your help.

Thanks,
Sharon
-- 
View this message in context:
http://statalist.1588530.n2.nabble.com/problem-with-grqreg-after-qreg-tp5243
782p5243782.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