Thanks as usual to Kit Baum, the program aaplot has been updated in the package of the same name on SSC. The update fixes a minor bug that, it seems, bit me alone.
The program was first announced in http://www.stata.com/statalist/archi.../msg01131.html
I repeat here the essence of that announcement and give below a few examples, as was not possible in 2011 when the forum was an email-based list without attachments.
The aa in aaplot can be thought of as "automatic annotation", namely that this plot is for showing
a scatter plot with linear and/or quadratic fit, automatically annotated
the annotation being, by default, model equations (with coefficients moderately rounded) and a display of R-square, sample size n and root mean square error. To get a formal statement,
To download, use ssc or adoupdate, as appropriate.
Since Stata 8, there have been various official commands, scatter, twoway lfit, twoway qfit, two or three of which are commonly combined on the fly or in programs. aaplot is just a convenience command putting together two or three of those official commands. Some users with very long memories may recall a sparl program, still on SSC, last revised in 2000, which requires Stata 6 and up, and still works, but is confined to the old graphics.
While hoping that aaplot might prove useful -- for example, in teaching or for initial explorations -- it is at best indicative, and certainly not definitive. Some tastes might run to showing (for example) standard errors, t statistics and P-values instead of, or in addition to, the results shown. Users so inclined should feel free to clone aaplot and should feel compelled to use their own different program name. (Totally out of the question as far as I am concerned is starring * ** *** equations as if they were hotels,restaurants or movies).
Stata 11 is required, but enterprising Stata users confined (say by financial exigency) to one of Stata 10,9 or 8 should find that a few minutes' work should be enough to make something very similar work with their Stata.
Here are some simple examples. Suppose we fire up the auto data and realise that curvature in the relation between mpg and weight implies some kind of transformation. A reciprocal sounds a good idea. In creating a new variable, we see as usual that a variable label would yield a better axis title. There is always some kind of dopey detail to fix: here our token is that the default format for RMSE is just the same as the variable created. We could certainly survive with fewer decimal places; indeed the number here is probably excessive still. The graphs below are the first and third created by this sequence.


The program was first announced in http://www.stata.com/statalist/archi.../msg01131.html
I repeat here the essence of that announcement and give below a few examples, as was not possible in 2011 when the forum was an email-based list without attachments.
The aa in aaplot can be thought of as "automatic annotation", namely that this plot is for showing
a scatter plot with linear and/or quadratic fit, automatically annotated
the annotation being, by default, model equations (with coefficients moderately rounded) and a display of R-square, sample size n and root mean square error. To get a formal statement,
Code:
. ssc type aaplot.sthlp
Since Stata 8, there have been various official commands, scatter, twoway lfit, twoway qfit, two or three of which are commonly combined on the fly or in programs. aaplot is just a convenience command putting together two or three of those official commands. Some users with very long memories may recall a sparl program, still on SSC, last revised in 2000, which requires Stata 6 and up, and still works, but is confined to the old graphics.
While hoping that aaplot might prove useful -- for example, in teaching or for initial explorations -- it is at best indicative, and certainly not definitive. Some tastes might run to showing (for example) standard errors, t statistics and P-values instead of, or in addition to, the results shown. Users so inclined should feel free to clone aaplot and should feel compelled to use their own different program name. (Totally out of the question as far as I am concerned is starring * ** *** equations as if they were hotels,restaurants or movies).
Stata 11 is required, but enterprising Stata users confined (say by financial exigency) to one of Stata 10,9 or 8 should find that a few minutes' work should be enough to make something very similar work with their Stata.
Here are some simple examples. Suppose we fire up the auto data and realise that curvature in the relation between mpg and weight implies some kind of transformation. A reciprocal sounds a good idea. In creating a new variable, we see as usual that a variable label would yield a better axis title. There is always some kind of dopey detail to fix: here our token is that the default format for RMSE is just the same as the variable created. We could certainly survive with fewer decimal places; indeed the number here is probably excessive still. The graphs below are the first and third created by this sequence.
Code:
sysuse auto, clear aaplot mpg weight gen gpm = 1000/mpg aaplot gpm weight label var gpm "Gallons / 1000 miles" aaplot gpm weight, rmseformat(%5.4f) both
Comment