* PS6.2 using DATA6-1 for Example 6.2 SAMPLE 1 20 TIME 1 1 READ(data6-1) UNITCOST OUTPUT INPCOST * * The GENR command is used to generate the squares of the two independent * variables, OUTPUT and INPCOST. * GENR OUTPUT2=OUTPUT**2 GENR INPCOST2=INPCOST**2 * * Estimate the regression of UNITCOST against a constant, OUTPUT, OUTPUT2, * INPCOST, INPCOST2. * OLS UNITCOST OUTPUT OUTPUT2 INPCOST INPCOST2 * * In the previous regression, the coefficient on the variable INPCOST2 is * insignificant and thus, the previous model will be re-estimated with * INPCOST2 omitted since it has no explanatory power. * OLS UNITCOST OUTPUT OUTPUT2 INPCOST / COEFF=B * * GENERATE ESTIMATED AVERAGES TO GRAPH THE AVERAGE COST FUNCTION * GENR T=TIME(0) GENR X=40+(T*5) GENR INPCOST1=80 GENR INPCOST2=115 GENR INPCOST3=150 GENR YHAT1=B(4)+(B(1)*X)+(B(2)*X*X)+(B(3)*INPCOST1) GENR YHAT2=B(4)+(B(1)*X)+(B(2)*X*X)+(B(3)*INPCOST2) GENR YHAT3=B(4)+(B(1)*X)+(B(2)*X*X)+(B(3)*INPCOST3) PRINT T X YHAT1 YHAT2 YHAT3 DELETE / ALL STOP