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 on April 23, and its replacement, statalist.org is already up and running.


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

RE: st: CIs around Qreg trend line


From   "Martin Weiss" <martin.weiss1@gmx.de>
To   <statalist@hsphsun2.harvard.edu>
Subject   RE: st: CIs around Qreg trend line
Date   Tue, 16 Mar 2010 00:46:48 +0100

<>


" What is being computed by the line "local level = (100 - 95) / 200"?"



Try Maarten`s http://www.stata-journal.com/article.html?article=st0137 to
get a handle on this issue.
Preprint at
http://www.uni-tuebingen.de/fileadmin/Uni_Tuebingen/Fakultaeten/SozialVerhal
ten/Institut_fuer_Soziologie/Dokumente/Pdf_Dateien/Buis/p-value_pdf.pdf



HTH
Martin


-----Original Message-----
From: owner-statalist@hsphsun2.harvard.edu
[mailto:owner-statalist@hsphsun2.harvard.edu] On Behalf Of Jeff
Sent: Dienstag, 16. März 2010 00:27
To: statalist@hsphsun2.harvard.edu
Subject: RE: st: CIs around Qreg trend line

Dear Mr. Cox,

Thank you.  The example syntax worked great.
Question:  
What is being computed by the line "local level = (100 - 95) / 200"?
Is this line in any way dependent upon the number of observations?
Alternatively, what does 200 signify.

Thanks again and pardon my ignorance.

Jeffrey B. Wolpin
 

-----Original Message-----
From: owner-statalist@hsphsun2.harvard.edu
[mailto:owner-statalist@hsphsun2.harvard.edu] On Behalf Of Nick Cox
Sent: Monday, March 15, 2010 1:41 PM
To: statalist@hsphsun2.harvard.edu
Subject: RE: st: CIs around Qreg trend line

sysuse auto, clear 
gen gpm = 1/mpg
qreg gpm weight 
predict pred 
predict se, stdp  
local level = (100 - 95) / 200  
gen ul = pred + invttail(e(df_r), `level') * se 
gen ll = pred - invttail(e(df_r), `level') * se 
twoway rarea ll ul weight, sort astyle(ci) || ///
line pred weight, sort || ///
scatter gpm weight, legend(off) ytitle(Gallons per mile)

Nick 
n.j.cox@durham.ac.uk 

Jeffrey B. Wolpin

In Stata 10, assuming a qreg regression with one predictor, is there a
way to develop confidence intervals around the qreg trend line (or any
quantile for that matter)?

Also, once developed, what would be the syntax to then graph the scatter
plot, trend line and confidence intervals?


*
*   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/


*
*   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