* * Example BIGCITY.DAT for pp 95-109 * open data bigcity.dat data(format=free,org=columns) 1 12 sales ads compete * scatter(footer="Figure 3-2 Big City Bookstore",hlabel="Advertising ($)",vlabel="Sales ($)") # ads sales * linreg sales # constant ads * scatter(footer="Figure 3-3 Big City Bookstore",hlabel="Advertising ($)",vlabel="Sales ($)",line=%beta) # ads sales * prj fitted set pcterr = 100.0*%resids/sales * print(picture="*.###") / sales fitted %resids pcterr * * @reganova is a regression "post-processor" which does the ANOVA table based * upon the last regression. * @reganova * * page 118-119. * PRJ can compute quite a few other statistics, in addition to just the fitted * values. In particular, the STDERRS option returns the individual forecast * standard errors, while XVX gives the value under the square root in formula * (3-22). This needs to multiplied by %seesq (the regression variance), and * square rooted in order to get the standard error of the regression line. * prj(stderrs=stderrs,xvx=sysq) set fiddle = sqrt(%seesq*sysq) print / fitted stderrs fiddle