*
* @regactfit
* Regression post-processor which graphs actual/fitted and residuals
* in separate vertical zones on the same box.
*
* Revision Schedule
*  07/05 Written by Tom Doan, Estima
*
procedure regactfit
option string header
*
local string theader
local series fitted
local integer depvar
*
if .not.%defined(header)
   compute theader='Actual/Fitted and Residuals'
else
   compute theader=header
*
set fitted = %eqndepvar(0){0}-%resids
compute depvar=%eqndepvar(0)
graph(overlay=line,ovrange=.5,ovcount=2,header=theader,vlabel='Residuals',ovlabel='Actual/Fitted') 3
# %resids
# depvar %regstart() %regend()
# fitted
end

