Dear Statalist,
I'm trying to make a graph of a nonlinear function overlayed on an OLS line. When I run the code below, I get the attached figure. Despite experimenting with various options (e.g., -connected-), I can't get function to display smoothly. What am I doing wrong?
Thanks!
-nick

nl log4: mw yr if id==2, initial(b0 1616 b1 5830) vce(robust) nolog
predict caLog4
graph twoway (scatter mw yr) (lfit mw yr) (line caLog4 yr) if id==2, tline(2003, lstyle(dot)) ///
title("California Wind Capacity") ///
ytitle("MW") ///
xtitle("") ///
legend(ring(1) pos(6) order(1 "Wind Capacity (MW)" 2 "Linear" 3 "Logistic")) ///
graphregion(color(white) ) plotregion( color(white))
I'm trying to make a graph of a nonlinear function overlayed on an OLS line. When I run the code below, I get the attached figure. Despite experimenting with various options (e.g., -connected-), I can't get function to display smoothly. What am I doing wrong?
Thanks!
-nick
nl log4: mw yr if id==2, initial(b0 1616 b1 5830) vce(robust) nolog
predict caLog4
graph twoway (scatter mw yr) (lfit mw yr) (line caLog4 yr) if id==2, tline(2003, lstyle(dot)) ///
title("California Wind Capacity") ///
ytitle("MW") ///
xtitle("") ///
legend(ring(1) pos(6) order(1 "Wind Capacity (MW)" 2 "Linear" 3 "Logistic")) ///
graphregion(color(white) ) plotregion( color(white))
Comment