* * Example of simple regression from pp 191-193 * open data pulppric.dat data(format=free,org=columns) 1 25 shipments price * * The instruction LINREG does a linear regression of one variable on a list of * other variables. The variable CONSTANT is a predefined column of 1's. LINREG * can be done using the Regressions wizard. * linreg shipments # constant price * * SCATTER does x-y graphs. The hlabels and vlabels options put informative labels * on the horizontal and vertical axes. LINE=%BETA adds a line based upon the * coefficients from the last regression. * scatter(footer="Figure 5-5 Scatterplot of Pulp Data",line=%beta,$ hlabel="World Pulp Price",vlabel="Pulp shipments") # price shipments * * Scatter plot of residuals (from page 204) * scatter(footer="Figure 5-11 Residual plot from Pulp Regression",$ hlabel="World Pulp Price",vlabel="Residuals") # price %resids