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

Re: st: plotting a polynomial graph in STATA

From   Kirimi Sindi <>
Subject   Re: st: plotting a polynomial graph in STATA
Date   Wed, 02 Dec 2009 16:02:33 -0500


Thank you very much, your suggestions works very well.


Maarten buis wrote:
--- On Wed, 2/12/09, Kirimi Sindi wrote:
How do I plot a graph polynomial to show there is or no
local inflection point?

I am running:

regress y  x  xsquared  xcubic

Is there a command after the regression to get STATA plot a

Just for fun I also added a 95% confidence interval (lb/ub):

*--------------- begin example ----------------------
sysuse nlsw88, clear
gen ttl_exp2 = ttl_exp^2
gen ttl_exp3 = ttl_exp^3
reg wage ttl_exp*

predict yhat, xb
predict se, stdp
gen lb = yhat - invttail(e(df_r),0.025)*se
gen ub = yhat + invttail(e(df_r),0.025)*se
twoway rarea lb ub ttl_exp, sort astyle(ci) || ///
line yhat ttl_exp, sort *--------------- end example ------------------------
( For more on how to use examples I sent to statalist see: )

Hope this helps,

Maarten L. Buis
Institut fuer Soziologie
Universitaet Tuebingen
Wilhelmstrasse 36
72074 Tuebingen

*   For searches and help try:

Imagination is more important than knowledge. For while knowledge defines all we currently know and understand, imagination points to all we might yet discover and create.

Kirimi Sindi
PhD Candidate
Department of Agricultural,
Food, and Resource Economics
Room 20 Cook Hall
Michigan State University
East Lansing,  MI  48824
Telephone: +1-517-353-5320
Cell : +1-517-505-9629	
Fax: +1-517-432-1800

*   For searches and help try:

© Copyright 1996–2015 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index