Professional Documents
Culture Documents
MTB MTB > # MTB > # One way of modelling supply response for an agricultural crop MTB > # is to specify quantity produced or output as the dependent MTB > # variable and to relate this variable to price and other MTB > # relevant supply determining variables. This was the approach MTB > # used previously for modelling wheat supply in a given region MTB > # of Australia. Another approach is to model area (acres) MTB > # sown as the dependent variable. Quantity produced is equal MTB > # to area sown multiplied by yield. Area sown is that component MTB > # of quantity that is completely controlled by the firm. MTB > # The decision to sow a given area will largely depend on the MTB > # firm's desired output at the beginning of the season. Price MTB > # or expected price is a major determinant of desired output. MTB > # After a given area has been sown, it is yield that determines MTB > # quantity produced. Yield will depend on the effects of weather, MTB > # pests and diseases and so is less controllable by the firm. MTB > # Some control on yield can be exerted, however, possibly through MTB > # irrigation, pesticides, weed control, and the like. MTB > # Here we are concerned with modelling the response of area of MTB > # sugarcane sown in a region of Bangladesh. By using area sown, MTB > # not quantity, as the dependent variable, we are eliminating yield MTB > # uncertainty and concentrating on the firm's main decision variable. MTB > # Also, since improvements in technology over time are likely to have MTB > # their effect on yield, not on area, there is no need, as we did for MTB > # wheat, to include a proxy for technological change as an MTB > # explanatory variable. The main product that competes with sugarcane MTB > # is jute. Thus, when farmers decide on an area for sugarcane production MTB > # (A), it is likely to be largely determined by the relative price MTB > # of sugarcane (Ps) to that of jute (Pj). An appropriate economic MTB > # model is A = f(Ps/Pj). Assume a log-linear (constant elasticity) MTB > # functional form. MTB > # Data comprising 34 annual observations on area (thousands of hectares), MTB > # sugarcane price (taka/tonne), and jut price (taka/tonne) are given. MTB > # Example comes from Griffiths et al p 516. MTB > # MTB > # Col 1 Area in thousands of hectares MTB > # Col 2 Price of sugarcane (taka/tonne/ MTB > # Col 3 Price of Jute (taka/tonne) MTB > # MTB > READ 'A:SUGAR' C1-C3
Entering data from file: A:SUGAR.DAT 34 rows read. Row 1 2 3 4 . MTB > MTB > MTB > MTB > MTB > MTB > MTB > MTB > MTB > MTB > MTB > MTB > MTB > MTB > MTB > SUBC> SUBC> SUBC> . . NAME C1 'AREA' C2 'PSUGAR' C3 'PJUTE' # Example application of the Cochrane-Orcutt procedure # taking the model logarea v. logpsugar and logpjute let c4 = loge(c1) let c5 = loge(c2) let c6 = loge(c3) name c4 'lnarea' c5 'lnsug' c6 'lnjute' lag 1 c4 c7 lag 1 c5 c8 lag 1 c6 c9 name c7 'lnarea-1' c8 'lnsug-1' c9 'lnjute-1' # Have lagged the Y and the X's ready for the calculation # of Y* and X*'s Name c10 = 'RESI1' Regress 'lnarea' 2 'lnsug' 'lnjute'; Constant; Residuals 'RESI1'; DW. C1 29 71 42 90 C2 73 108 94 107 C3 970 940 930 970
Regression Analysis The regression equation is lnarea = 3.96 + 0.994 lnsug - 0.685 lnjute Predictor Constant lnsug lnjute s = 0.3956 Coef 3.963 0.9940 -0.6853 Stdev 2.966 0.1424 0.4596 t-ratio 1.34 6.98 -1.49 p 0.191 0.000 0.146
R-sq = 62.1%
R-sq(adj) = 59.6%
Analysis of Variance SOURCE Regression Error Total SOURCE lnsug lnjute DF 2 31 33 DF 1 1 SS 7.9375 4.8525 12.7900 SEQ SS 7.5895 0.3479 MS 3.9687 0.1565 F 25.35 p 0.000
Unusual Observations Obs. lnsug lnarea St.Resid 10 5.16 3.2581 -3.07R 17 5.48 5.5215 X
R denotes an obs. with a large st. resid. X denotes an obs. whose X value gives it large influence. Durbin-Watson statistic = 1.16 MTB > # The DW indicates the presence of possible positive autocorrelation MTB > # other tests should also be carried out to confirm this MTB > # Copy the residuals from column 10 to a scratch column for processing MTB > copy c10 c20 MTB > name c20 'et' MTB > name c21 'et-1' MTB > name c22 'et*et-1' MTB > name c23 'et-1sq' MTB > name c24 'Y*' c25 'Xsug*' c26 'Xjut*' MTB > # Everything is now set up for the calculation of rho MTB > # These steps can be re-used during the iterations MTB > lag 1 c20 c21 MTB > let c22 = c20*c21 MTB > let c23 = c21*c21 MTB > let k1 = sum(c22) MTB > let k2 = sum(c23) MTB > let k3 = k1/k2 MTB > print k3 Data Display K3 0.416959 MTB > # Initial estimate of rho is held in K3 MTB > # Now need to calculate Y* and the X*'s MTB > info Information on the Worksheet
Name AREA PSUGAR PJUTE lnarea lnsug lnjute lnarea-1 lnsug-1 lnjute-1 RESI1 et et-1 et*et-1 et-1sq Y* Xsug* Xjut*
Count 34 34 34 34 34 34 34 34 34 34 34 34 34 34 0 0 0
Missing 0 0 0 0 0 0 1 1 1 0 0 1 1 1 0 0 0
Constant Name K1 K2 K3
MTB > MTB > MTB > MTB > MTB > MTB > SUBC> SUBC> SUBC>
let c25 = c5 - k3*c8 let c26 = c6 - k3*c9 # Now carry out the regression to get the new estimates of # the betas Name c27 = 'RESI2' Regress 'Y*' 2 'Xsug*' 'Xjut*'; Constant; Residuals 'RESI2'; DW.
Regression Analysis
The regression equation is Y* = 3.21 + 1.04 Xsug* - 0.946 Xjut* 33 cases used 1 cases contain missing values Predictor Constant Xsug* Xjut* s = 0.3615 Coef 3.212 1.0438 -0.9459 Stdev 1.420 0.2347 0.3471 t-ratio 2.26 4.45 -2.73 p 0.031 0.000 0.011
R-sq = 42.9%
R-sq(adj) = 39.1%
Analysis of Variance SOURCE Regression Error Total SOURCE Xsug* Xjut* DF 2 30 32 DF 1 1 SS 2.9410 3.9209 6.8620 SEQ SS 1.9704 0.9706 MS 1.4705 0.1307 F 11.25 p 0.000
Unusual Observations Obs. Xsug* Y* St.Resid 10 2.98 1.6996 -2.64R 17 3.19 3.6055 X 18 3.41 2.2086 X
R denotes an obs. with a large st. resid. X denotes an obs. whose X value gives it large influence. Durbin-Watson statistic = 1.84 MTB > # Remember to calculate the new value of the intercept MTB > let k4 = 3.212/(1 - k3) MTB > print k4 Data Display K4 5.50904 MTB > # The estimate of the model is now given by MTB > # MTB > # lnarea = 5.50904 + 1.0438*lnsugar - 0.9459*lnjute
MTB > # MTB > # Can see the DW has improved. Will also need to examine the MTB > # residuals put in c27 to see if they are free of auto. MTB > # In order to see if stability has been reached will need to MTB > # calculate the new set of residuals, re-calculate the value MTB > # of rho and hence Y* and X*'s to see if there is any change MTB > # in the stimates of the betas MTB > # MTB > let c20 = c4 - (5.50904 + 1.0438*c5 - 0.9459*c6) MTB > # MTB > # The new set of residuals are calculated and put into the scratch MTB > # c20. Can now use copy and paste to re-use previous coding. MTB > lag 1 c20 c21 MTB > let c22 = c20*c21 MTB > let c23 = c21*c21 MTB > let k1 = sum(c22) MTB > let k2 = sum(c23) MTB > let k3 = k1/k2 MTB > print k3 Data Display K3 MTB > MTB > MTB > MTB > MTB > MTB > MTB > MTB > MTB > SUBC> SUBC> SUBC> 0.449406 # This is the second estimate of rho. Noe calculate the new # Y* and X*'s let c24 = c4 - k3*c7 let c25 = c5 - k3*c8 let c26 = c6 - k3*c9 # Now carry out the regression to get the new estimates of # the betas Name c27 = 'RESI2' Regress 'Y*' 2 'Xsug*' 'Xjut*'; Constant; Residuals 'RESI2'; DW.
Regression Analysis
The regression equation is Y* = 3.05 + 1.05 Xsug* - 0.959 Xjut* 33 cases used 1 cases contain missing values Predictor Constant Xsug* Xjut* s = 0.3613 Coef 3.051 1.0539 -0.9585 Stdev 1.341 0.2477 0.3410 t-ratio 2.28 4.26 -2.81 p 0.030 0.000 0.009
R-sq = 41.7%
R-sq(adj) = 37.8%
Analysis of Variance SOURCE Regression Error Total SOURCE Xsug* DF 2 30 32 DF 1 SS 2.7978 3.9155 6.7133 SEQ SS 1.7664 MS 1.3989 0.1305 F 10.72 p 0.000
Xjut*
1.0314
Unusual Observations Obs. Xsug* Y* St.Resid 10 2.81 1.5784 -2.57R 17 3.01 3.4564 X 18 3.23 2.0295 X
R denotes an obs. with a large st. resid. X denotes an obs. whose X value gives it large influence. Durbin-Watson statistic = 1.90 MTB > let k4 = MTB > print k4 Data Display K4 MTB MTB MTB MTB MTB MTB MTB MTB 5.54129 let c20 = c4 - ( 5.54129 + 1.0539*c5 lag 1 c20 c21 let c22 = c20*c21 let c23 = c21*c21 let k1 = sum(c22) let k2 = sum(c23) let k3 = k1/k2 print k3 3.051/(1 - k3)
- 0.9585*c6)
Data Display K3 MTB > MTB > MTB > MTB > MTB > MTB > MTB > MTB > SUBC> SUBC> SUBC> 0.451502 # This is the third estimate of rho let c24 = c4 - k3*c7 let c25 = c5 - k3*c8 let c26 = c6 - k3*c9 # Now carry out the regression to get the new estimates of # the betas Name c27 = 'RESI2' Regress 'Y*' 2 'Xsug*' 'Xjut*'; Constant; Residuals 'RESI2'; DW.
Regression Analysis The regression equation is Y* = 3.04 + 1.05 Xsug* - 0.959 Xjut* 33 cases used 1 cases contain missing values Predictor Constant Xsug* Xjut* s = 0.3613 Coef 3.040 1.0546 -0.9593 Stdev 1.336 0.2486 0.3406 t-ratio 2.28 4.24 -2.82 p 0.030 0.000 0.009
R-sq = 41.6%
R-sq(adj) = 37.7%
Analysis of Variance SOURCE Regression Error Total SOURCE Xsug* Xjut* DF 2 30 32 DF 1 1 SS 2.7891 3.9155 6.7046 SEQ SS 1.7537 1.0354 MS 1.3945 0.1305 F 10.68 p 0.000
Unusual Observations Obs. Xsug* Y* St.Resid 10 2.80 1.5705 -2.57R 17 2.99 3.4468 X 18 3.22 2.0179 X
R denotes an obs. with a large st. resid. X denotes an obs. whose X value gives it large influence. Durbin-Watson statistic = 1.90 MTB > let k4 = 3.040/(1 - k3) MTB > print k4 Data Display K4 MTB MTB MTB MTB MTB MTB MTB MTB 5.54241 let c20 = c4 - (5.54241 + 1.0546*c5 lag 1 c20 c21 let c22 = c20*c21 let c23 = c21*c21 let k1 = sum(c22) let k2 = sum(c23) let k3 = k1/k2 print k3
-0.9593*c6)
Data Display K3 0.451605 MTB > # Can now see that rho has converged and hence the estimates of MTB > # the betas. MTB > # You will need to calculate such things as R Square etc MTB > let c99 = c20*c20 MTB > let k5 = sum(c99) MTB > let k6 = 1 - k5/12.79 MTB > # The figure of 12.79 is the Total Sum of Squares from initial regression MTB > print k6 Data Display K6 0.615445 MTB > # This is the actual value of R Square for the corrected model MTB > # Good Luck - I hope this has been a helpful guide A.J. Mabbett