Adding SE's in @REGACTFIT
Posted: Sun Aug 22, 2021 8:20 am
Hi Tom,
I'd like to add SE's to the residuals in @REGACTFIT for use with BOXJENK, LINREG and VAR's.
Is this as straightforward as the following:
* Actual vs fitted and residuals
spgraph(hea='y\\Top panel: Actual vs fitted\\Bottom panel: Residuals',vfi=1,hfi=1)
set fitted = %eqndepvar(0){0}-resids
compute depvar=%eqndepvar(0)
sstats(mean) %regstart() %regend() resids>>mu_resids
set Upp %regstart() %regend() = mu_resids + sqrt(%seesq)
set Low %regstart() %regend() = mu_resids - sqrt(%seesq)
graph(overlay=line,ovrange=.5,ovcount=2,vlabel='Residuals',ovlabel='Actual/Fitted',key=below) 5
# resids
# Upp %regstart() %regend()
# Low %regstart() %regend()
# depvar %regstart() %regend()
# fitted
spgraph(done)
Thanks,
Amarjit
I'd like to add SE's to the residuals in @REGACTFIT for use with BOXJENK, LINREG and VAR's.
Is this as straightforward as the following:
* Actual vs fitted and residuals
spgraph(hea='y\\Top panel: Actual vs fitted\\Bottom panel: Residuals',vfi=1,hfi=1)
set fitted = %eqndepvar(0){0}-resids
compute depvar=%eqndepvar(0)
sstats(mean) %regstart() %regend() resids>>mu_resids
set Upp %regstart() %regend() = mu_resids + sqrt(%seesq)
set Low %regstart() %regend() = mu_resids - sqrt(%seesq)
graph(overlay=line,ovrange=.5,ovcount=2,vlabel='Residuals',ovlabel='Actual/Fitted',key=below) 5
# resids
# Upp %regstart() %regend()
# Low %regstart() %regend()
# depvar %regstart() %regend()
# fitted
spgraph(done)
Thanks,
Amarjit