* * F-test examples on page 137 * open data andy.dat data(format=free,org=columns) 1 75 sales price ads * linreg sales # constant price ads * exclude # price exclude # price ads * * SET is the instruction for doing general transformations of full data series. * This creates ASQ as the square of the ADS series. * set asq = ads^2 linreg sales # constant price ads asq * exclude(title="Test of Advertising Variables") # ads asq * disp "Optimal Ad Expenditure" (1-%beta(3))/(2*%beta(4)) * * RESTRICT is the most general of the hypothesis testing instructions. It can test * hypotheses involving linear combinations of the coefficients. Each restriction * is represented by a pair of # lines. The first has the coefficient positions * entering the restriction, the second has the corresponding multipliers followed * by the target value for that linear combination. In this case, we're testing * * 1.0 x B(3) + 3.8 x B(4) = 1.0 * * The wizard for RESTRICT is "Regression Tests" on the "Statistics" menu. Choose * "General Linear Restrictions". * restrict(title="Test of Optimal Expenditure") 1 # 3 4 # 1.0 3.8 1.0 * * Joint hypothesis on page 145 * restrict(title="Joint Hypothesis") 2 # 3 4 # 1.0 3.8 1.0 # 1 2 3 4 # 1.0 6.0 1.9 1.9^2 80.0