Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.
From | Nick Cox <njcoxstata@gmail.com> |
To | "statalist@hsphsun2.harvard.edu" <statalist@hsphsun2.harvard.edu> |
Subject | Re: st: scatterplot with equation line |
Date | Fri, 1 Nov 2013 15:31:19 +0000 |
-aaplot- (SSC) supports some simple regression models. -regplot- (SJ) will also do this post hoc for many models that will fit on a graph. Once installed, the help gives several examples. . search regplot SJ-10-1 gr0009_1 . . . . Software update for model diagnostic graph commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . N. J. Cox (help anovaplot, indexplot, modeldiag, ofrtplot, ovfplot, qfrplot, racplot, rdplot, regplot, rhetplot, rvfplot2, rvlrplot, rvpplot2 if installed) Q1/10 SJ 10(1):164 provides new command rbinplot for plotting means or medians of residuals by bins; provides new options for smoothing using restricted cubic splines; updates anova examples SJ-4-4 gr0009 . . . . . . . . . . Speaking Stata: Graphing model diagnostics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . N. J. Cox (help anovaplot, indexplot, modeldiag, ofrtplot, ovfplot, qfrplot, racplot, rdplot, regplot, rhetplot, rvfplot2, rvlrplot, rvpplot2 if installed) Q4/04 SJ 4(4):449--475 plotting diagnostic information calculated from residuals and fitted values from regression models with continuous responses Nick njcoxstata@gmail.com On 1 November 2013 14:34, Alfonso Sánchez-Peñalver <alfonso.statalist@gmail.com> wrote: > you could always predict the expected value of the response variable after your regression and plot that as the line. On Nov 1, 2013, at 10:24 AM, Scott Merryman <scott.merryman@gmail.com> wrote: >> See -help twoway function- >> >> For example: >> >> sysuse auto >> scatter price mpg || function y = 11000 - 400*x + 5*x^2, range(10 40) On Fri, Nov 1, 2013 at 9:17 AM, Alice Guerra <alice.guerra88@gmail.com> wrote: >>> how can I do a scatterplot with a specific equation line? >>> >>> In particular, I would like to plot a scatter with a regression line >>> that does not derive from an OLS, but from a dummy regression (so, I >>> cannot use lfit). >>> >>> Thank you for your help and for your time * * For searches and help try: * http://www.stata.com/help.cgi?search * http://www.stata.com/support/faqs/resources/statalist-faq/ * http://www.ats.ucla.edu/stat/stata/