REGANOVA Procedure |
@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. To use it, run a LINREG first, then do @REGANOVA.
@REGANOVA(no options or parameters)
Example
*
* Makridakis et al, Forecasting Methods and Applications, 3rd edition
* Example from pp 205-207
*
open data pcv.dat
data(format=prn,org=columns) 1 19 gdpw_eur pdpeall
*
linreg pdpeall
# constant gdpw_eur
*
* Scatter plot with regression line
*
scatter(footer="Figure 5-12 PCV Sales Regression",line=%beta,$
hlabel="GDP Western Europe",vlabel="PCV Industry Sales")
# gdpw_eur pdpeall
*
* Residuals
*
scatter(footer="Figure 5-13 Residual Plot",$
hlabel="GDP Western Europe",vlabel="Residuals")
# gdpw_eur %resids
*
* Analysis of variance table (page 214)
* (The F-statistic is in the standard regression output)
*
@reganova
Sample Output
This first shows the output from the LINREG, with the usual F-statistic. The @REGANOVA output is below that and gives the breakdown on the components that go into the F. The ratio of the two mean-squares is the F.
Linear Regression - Estimation by Least Squares
Dependent Variable PDPEALL
Usable Observations 19
Degrees of Freedom 17
Centered R^2 0.9010023
R-Bar^2 0.8951789
Uncentered R^2 0.9999442
Mean of Dependent Variable 8.7249938421
Std Error of Dependent Variable 0.2129504110
Standard Error of Estimate 0.0689450232
Sum of Squared Residuals 0.0808080758
Regression F(1,17) 154.7211
Significance Level of F 0.0000000
Log Likelihood 24.9113
Durbin-Watson Statistic 2.4076
Variable Coeff Std Error T-Stat Signif
************************************************************************************
1. Constant -4.207701265 1.039835249 -4.04651 0.00083836
2. GDPW_EUR 1.598565305 0.128515536 12.43869 0.00000000
Regression ANOVA for Dependent Variable PDPEALL
Source Sum of Squares DF Mean Square
Regression 0.7354537202 1 0.7354537202
Residuals 0.0808080758 17 0.0047534162
Total 0.8162617960 18
Copyright © 2025 Thomas A. Doan