*
* @regactfit
* Regression post-processor which graphs actual/fitted and residuals
* in separate vertical zones on the same box.
*
* Revision Schedule
*  07/2005 Written by Tom Doan, Estima
*  05/2007 Add footer option
*
procedure regactfit
option string header
option string footer
*
local string theader
local series fitted
local integer depvar
local integer needheader
*
compute needheader=.not.%defined(header).and..not.%defined(footer)
if needheader
   spgraph(header="Actual/Fitted and Residuals")

set fitted %regstart() %regend() = %eqndepvar(0){0}-%resids
compute depvar=%eqndepvar(0)

graph(overlay=line,ovrange=.5,ovcount=2,header=header,footer=footer,$
    vlabel="Residuals",ovlabel="Actual/Fitted") 3
# %resids
# depvar %regstart() %regend()
# fitted

if needheader
   spgraph(done)

end




