Title stata.com
graph twoway qfit — Twoway quadratic prediction plots
Syntax Menu Description Options
Remarks and examples Also see
Syntax
twoway qfit yvar xvar
if
in
weight
, options
options Description
range(# #) range over which predictions calculated
n(#) number of prediction points
atobs calculate predictions at xvar
estopts(regress options) options for regress
predopts(predict options) options for predict
cline options change look of predicted line
axis choice options associate plot with alternative axis
twoway options titles, legends, axes, added lines and text, by, regions, name,
aspect ratio, etc.
See [G-3] cline options, [G-3] axis choice options, and [G-3] twoway options.
All options are rightmost; see [G-4] concept: repeated options.
yvar and xvar may contain time-series operators; see [U] 11.4.4 Time-series varlists.
aweights, fweights, and pweights are allowed. Weights, if specified, affect estimation but not how
the weighted results are plotted. See [U] 11.1.6 weight.
Menu
Graphics > Twoway graph (scatter, line, etc.)
Description
twoway qfit calculates the prediction for yvar from a linear regression of yvar on xvar and xvar
2
and plots the resulting curve.
Options
range(# #) specifies the x range over which predictions are calculated. The default is range(. .),
meaning the minimum and maximum values of xvar. range(0 10) would make the range 0 to
10, range(. 10) would make the range the minimum to 10, and range(0 .) would make the
range 0 to the maximum.
1