*
* @regANOVA
*
* RegANOVA is a post-processor for a linear regression which displays an ANOVA
* table. It has no parameters, picking all information out of the accessible
* variables.
*
* Revision Schedule:
*   01/2003 Written by Tom Doan. Estima.
*
proc reganova
local real totalss regss
local string picture
*
compute totalss=%variance*(%nobs-1)
compute regss  =totalss-%rss
*
compute picture=%bestrep(||totalss,%rss||,12)
disp "Regression ANOVA for Dependent Variable" %l(%eqndepvar(0))
disp "Source" @20 "Sum of Squares" @>40 "DF" @45 "Mean Square"
disp "----------------------------------------------------------"
disp "Regression" @20 &picture regss @35 ##### %nreg-1 &picture @45 regss/(%nreg-1)
disp "Residuals" @20 &picture %rss @35 ##### %ndf @45 &picture %rss/%ndf
disp "----------------------------------------------------------"
disp "Total" @20 &picture totalss @35 ##### %nobs-1
end reganove


