Humpty Dumpty looked doubtful. 'I'd rather see that done on paper,' he said. APPENDIX G THE RECURSIVE BAYESIAN ESTIMATION PROGRAM ON THE TEXAS INSTRUMENTS PROGRAMMABLE CALCULATOR [Anything in square brackets is a comment] [This program will cope with a constant and with two explanatory variables] CLR STO 08 2nd OP 00 [Read t0, M0, C0, main diagonal only] R/S STO 00 2nd PRT R/S STO 10 2nd PRT R/S STO 11 2nd PRT R/S STO 12 2nd PRT R/S STO 13 2nd PRT R/S STO 14 2nd PRT R/S STO 15 2nd PRT [Increment t, print T and "T"] 2nd LBL A 2nd OP 20 37 2nd OP 04 RCL 00 2nd OP 06 [Read data Y, V, X2, X3, W and predict Ct; print these] R/S STO 29 2nd PRT R/S STO 07 2nd PRT R/S STO 19 2nd PRT R/S STO 20 2nd PRT R/S SUM 13 2nd PRT R/S SUM 14 2nd PRT R/S SUM 15 2nd PRT [Predict Y] 45 2nd OP 04 [prepare to print "Y"] RCL 10 + RCL 11 * RCL 19 + RCL 12 * RCL 20 = STO 21 2nd OP 06 [Print forecast of Y and "Y"] [Put forecast of Y - Y (=error) into 09. If flag 0 set, add error2 to sum of squared errors (SSE), print SSE, set flag to 0] - RCL 29 = STO 09 2nd PRT INV 2nd IFFLG 0 B x2 SUM 08 2nd LBL B RCL 08 2nd PRT 2nd STFLG 0 [Var(forecast y) = X1X1C11 + 2X1X2C12 + 2X1X3C13 + 2X2X3C23 + X2X2C22 + X3X3C33 + V] 42 2nd OP 04 RCL 13 + 2 * RCL 19 * RCL 16 + 2 * RCL 20 * RCL 18 + 2 * RCL 19 * RCL 20 * RCL 17 + RCL 19 X2 * RCL 14 + RCL 20 X2 * RCL 15 + RCL 07 = STO 22 2nd OP 06 [Print Var and "V"] [Calculate Kalman gain] 22 2nd OP 04 2nd OP 05 [Print "G"] (RCL 13 + RCL 19 * RCL 16 + RCL 20 * RCL 18 )STO 01 / RCL 22 = STO 23 2nd PRT [G1] (RCL 16 + RCL 19 * RCL 14 + RCL 20 * RCL 17 )STO 02 / RCL 22 = STO 24 2nd PRT [G2] (RCL 18 + RCL 19 * RCL 17 + RCL 20 * RCL 15 )STO 03 / RCL 22 = STO 25 2nd PRT [G3] 30 2nd OP 04 2nd OP 05 [Print "M" and calculate M] RCL 10 - RCL 23 * RCL 09 = STO 10 2nd PRT RCL 11 - RCL 24 * RCL 09 = STO 11 2nd PRT RCL 12 - RCL 25 * RCL 09 = STO 12 2nd PRT 15 2nd OP 04 2nd OP 05 [Print "C" and calculate C] RCL 13 - RCL 23 * RCL 01 = STO 13 2nd PRT RCL 14 - RCL 24 * RCL 02 = STO 14 2nd PRT RCL 15 - RCL 25 * RCL 03 = STO 15 2nd PRT RCL 16 - RCL 23 * RCL 02 = STO 16 2nd PRT RCL 17 - RCL 24 * RCL 03 = STO 17 2nd PRT RCL 18 - RCL 25 * RCL 01 = STO 18 2nd PRT 2nd ADV GTO A To run: Key in t0, constant0, m20, m30, c110, c220, c330 Program prompts with year T Key in Y, V, X2, X3, W11, W22, W33 Prints Y forecast y, error, sum of squared errors V Var(forecast y) G Gain1, Gain2, Gain3 M M1, M2, M3 C C11, C22, C33, C12, C23, C13 blank line ALLOCATION OF STORAGE STORE CONTENTS 00 T 01 to 03 X * C 07 V 08 Sum of squared errors 09 YF - Y = error 10 to 12 ME 13 to 18 CE 19, 20 X2, X3 (X1 = 1) 21 YF 22 Var(YF) 23 to 25 G 26 to 28 W11, W22, W33 29 Y It is possible to rewrite the program to cope with an additional explanatory variable and still fit into a TI59, but that is probably the limit. You will find it a very good practice always to verify your references, sir. Martin Routh APPENDIX H REFERENCES T.W. Anderson 1958 An introduction to multivariate statistical analysis. Wiley, New York. J.S. Armstrong 1978 Long range forecasting. Wiley-Interscience. M. Athans 1974 The importance of Kalman filtering methods for economic systems. Annals of economic and social measurement. 3/1 1974, pp. 49-64 P. Balestra and Pooling cross-section and time-series data in the M. Nerlove 1966 estimation of a dynamic model: the demand for natural gas. Econometrica July 1966, pp.585-612. R.J. Ball 1978 Assessment of short term economic forecasts. Economic outlook, June 1978, the London Business School centre for economic forecasting, Gower press. R. Battin 1962 Optimising a statistical navigation procedure for space flight. American rocket society, 32, November 1962, pp. 1681-1696 T. Bayes 1763 Essay towards solving a problem in the doctrine of chances. Biometrika 45 293, 1958 (reproduction of 1763 paper) S.V. Berg (ed.) 1973 Annals of economic and social measurement: special issue on time varying parameters, Vol 2 no 4 October 1973 E.R. Berndt, 1978 Factor markets in general M.A. Fuss and disequilibrium - dynamic models of L. Waverman the industrial demand for energy. In Workshop on energy supply and demand, IEA 1978. D.J. Blumenthal 1980 Bayesian updates in turning point forecasts. The business economist, Summer 1980, pp. 19-27 BMDP 1981 BMDP statistical software. University of California Press E. Bodewig 1956 Matrix calculus. Interscience, 1956. D.R. Bohi 1981 Analyzing demand behaviour; a study of energy elasticities. The Johns Hopkins University Press. Baltimore and London. V.K. Borooah and An application of Kalman filters in econometric modelling. Discussion S.P. Chakravarty 1978 paper no. 7803, University of Southampton G.E.P. Box and Some statistical aspects of adaptive optimization and control. Journal of the Royal statistical G.M. Jenkins 1962 society, B, vol 24 no 2 1962 pp. 297-343 G.E. Box and Time series analysis: forecasting and control. San Francisco : G.M. Jenkins 1970 Holden-Day, 1970. G.E.P. Box and A note on the generation of random M.A. Muller 1958 normal deviates. Ann. Math. Statist. 29, 610-613 R.G. Brown 1963 Smoothing, forecasting and prediction. Prentice Hall, Englewood Cliffs R.L. Brown, 1975 Techniques for testing the constancy of regression J. Durbin and relationships over time. Journal of the Royal statistical society B J.M. Evans 37 pp. 149-163 D.W. Bunn 1975 A Bayesian approach to the linear combination of forecasts. Operational research quarterly vol 26, 2, i, pp. 325-329 E. Burmeister and Kalman filter estimation of K.D. Wall 1982 unobserved rational expecations with an application to the German hyperinflation. Journal of econometrics 20 1982 pp. 255-284 A. Buse 1979 Pooling time-series and cross-section data: Tobin revisited (again). Research paper 79-10, Department of economics, University of Alberta. F. Campbell and 1975 A critical analysis of ridge G. Smith regression. Unpublished paper. N. Cantarelis 1979 Bayesian forecasting models. PhD thesis, University of Warwick. N. Cantarelis and On line variance estimation for the steady state Bayesian forecasting F.R. Johnston 1979 model. University of Warwick school of industrial and business studies, working paper no. 34 G.C. Chow 1981 Econometric analysis by control methods. John Wiley and Sons, 1981 A. Cohen 1977 A Bayesian approach used to increase power in a test of hypotheses in linear regression. Metroeconomica XXIX pp. 97-104 R. Cole 1969a Errors in provisional estimates of gross national product. New York: National bureau of economic research R. Cole 1969b Data errors and forecasting accuracy. Chapter 2 in J. Mincer (ed.) Economic forecasts and expectations; analyses of forecasting behavoiur and performance. New York: National bureau of economic research M.S. Common 1976 Basic econometrics. Longman. M.Common 1981 Implied elasticities in some UK energy projections. Energy economics, July 1981, pp. 153-158 D. Conniffe and A critical review of ridge regression. The statistician, 1973, J. Stone 1973 vol 22, part 3 T.F. Cooley and Tests of an adaptive regression model. Review of economics and E.C. Prescott 1973a statistics, May 1973, pp. 248-256 T.F. Cooley and An adaptive regression model. E.C. Prescott 1973b International economic review, June 1973 pp. 364-371 T.F. Cooley and Estimation in the presence of stochastic parameter E.C. Prescott 1976 variation. Econometrica Vol 44, No 1, pp. 167-183 J.E.H. Davidson 1978 Econometric modelling of the D.F. Hendry aggregate time-series relationship F. Srba between consumers expenditure and and S. Teo income in the United Kingdom. The economic journal, 88, December 1978, pp. 661-692 T. Dielman and Pooling cross-sectional and time-series data; a review R.L. Wright 1977 of statistical estimation techniques. Working paper 141, Division of research, Graduate school of business administration, University of Michegan P.J. Dhrymes 1970 Econometrics. Statistical foundations and applications. Harper and Row, 1970 H.K. van Dijk and Further experience in Bayesian analysis using Monte T. Kloek 1980 Carlo integration. Journal of econometrics 14 pp. 307-328 S. Ekern 1980 Adaptive exponential smoothing revisited. Norwegian school of economics and business administration discussion paper 01/80 Federal Energy 1976 1976 National energy outlook. Administration Federal energy administration, Washington D.C. R. Fildes 1982 An evaluation of Bayesian forecasting. Manchester Business school working paper no. 77, 1982 R. Fildes 1983 An evaluation of Bayesian forecasting. Journal of Forecasting Volume 2, 1983, pp. 137-150 R. Fildes, with 1981 A bibliography of business and D. Dews and economic forecasting. Gower, 1981 S. Howell R. Fildes and 1977 On specifying a quantitative S. Howell forecasting model. Manchester Business school working paper no. 35, 1977 R. Fildes and 1978 Look - no data: Bayesian C. Stevens forecasting and the effects of prior knowledge. In Forecasting and Planning, R. Fildes and D. Wood, editors. Sascon House, 1978 F. Galton 1886 Family likeness in stature. Procedings of the Royal society in London, 1886, pp. 42-72 K.F. Gauss 1821 Werke, Gottingen, 4, 1821 Theoria combinationis observationum erroribus minimus obnoxiae. (Collected works, 1873). See also "Theory of the motion of the heavenly bodies moving about the sun in conic sections" Dover, New York. W.G. Gilchrist, 1967 Methods of estimation involving discounting. Journal of the royal statistical society, B 29 pp. 355-369 W.G. Gilchrist 1974 Statistical forecasting - the state of the art. Omega vol 2 no 6, 1974 pp. 733-750 E.J. Godolphin and Equivalence theorems for polynomial-projecting P.J. Harrison 1975 predictors. Journal of the Royal statistical society Vol 37 no 2 1975 pp. 205-215 M. Green and On aggregate forecasting. Warwick statistics research P.J. Harrison 1972 report no 2 M. Green and Fashion forecasting for a mail-order company using P.J. Harrison 1973 a Bayesian approach. Operational research quarterly 24, pp. 193-205 D.M. Grether 1980 Bayes rule as a descriptive model: the representativeness heuristic. The quarterly journal economics, November 1980, pp. 537-557 W.E. Griffiths, Bayesian estimation of a random R.G. Drynan and coefficient model. Journal of S. Prakash econometrics 10 pp. 201-220 V. Hall 1981 The formulation and econometric estimation of inter-fuel substitution models and elasticities. OECD research paper. P.J. Harrison 1965 Short term sales forecasting. Journal of the Royal statistical society C XIV pp. 102-139 P.J. Harrison 1967 Exponential smoothing and short term sales forecasting Management science Vol 30 no 11 pp. 821-842. P.J. Harrison and A Bayesian approach to short-term forecasting. Operational Research C.F. Stevens, 1971 Quarterly, Vol 22 No 4 pp. 341-362 P.J. Harrison and Bayesian forecasting. University of Warwick Statistical research C.F. Stevens, 1975a report No 13. P.J. Harrison and Bayes forecasting in action: case studies. University of Warwick C.F. Stevens, 1975b statistical research report no. 14. P.J. Harrison and Bayesian forecasting (with discussion). Journal C.F. Stevens, 1976 of the Royal statistical society B, Vol 38 no 3, pp. 205-247 A.C. Harvey 1981a Time series models. Philip Allan, 1981 A.C. Harvey 1981b The econometric analysis of time series. Philip Allan, 1981 A.C.Harvey 1983 A unified view of statistical forecasting procedures. Department of Statistics, London School of Economics D. Hawdon and 1982 Energy demand models in the USA and M. Tomlinson UK. Surrey energy economics discussion paper no. 8. January 1982 H. Heffes 1966 The effect of erroneous models on the Kalman filter response. IEEE transactions on automatic control, July 1966, pp. 541-543 D.F. Hendry 1980 Econometrics - alchemy or science? Economica, 47, November 1980, pp. 387 - 406. C. Hildreth and Some estimators for a linear model with random coefficients. Journal J. Houck 1968 of the American statistical association, 1968, pp. 584-595 Y.C. Ho and A Bayesian approach to problems in stochastic estimation and control. R.C.K. Lee 1964 Transactions of the institute of electrical engineers. Vol 9 part 4 pp. 333-339 E.P. Howrey 1978 The use of preliminary data in econometric forecasting. The review of economics and statistics 60,2,pp. 193-200 S. Hughes 1976 Estimation of the response of demand for wool to changes in its price. International Wool Secretariat, 1976 W.R. Hughes 1980 Petrol consumption in New Zealand 1969-1979: Fixed and time-varying parameter results. New Zealand economic papers,1980, vol. 14, pp. 28-42 A.H. Jazwinski 1970 Stochastic processes and filtering theory. Academic press Inc. New York 1970 H. Jeffreys 1961 Theory of probability. 3rd edition, Clarendon Press Oxford. F.R. Johnston and An application of forecasting in the alcoholic drinks industry. P.J. Harrison 1980 Journal of the operational research society, Vol 31 no8, pp. 699-709 J. Johnston 1963 Econometric methods. McGraw-Hill Kogakusha J. Johnston 1972 Econometric methods. McGraw-Hill Kogakusha G.G. Judge, 1982 Introduction to the theory and R.C. Hill, practice of econometrics. W. Griffiths, John Wiley and sons, 1982 H. Lutkepohl and Tsoung-Chao Lee R.E. Kalman 1960 A new approach to linear filtering and prediction problems. Transactions ASME Journal of basic engineering 82-D 1960 pp. 34-45 R.E. Kalman 1963 New methods in Wiener filtering theory. Proceedings of the first symposium on engineering application of random function theory and probability. (J.L. Bogdanoff and F. Kozin, editors) pp. 270-388 John Wiley, New York R.E. Kalman and New results in linear filtering and prediction theory. Journal of basic R.S. Bucy 1961 engineering (ASME transactions) 83 D pp. 95-108 M.G. Kendall 1973 Time series. Charles Griffin & Co Ltd. D.A. King 1982 Accuracy of the quarterly GNP estimates. Business economics, Vol 17, part 3, 1982 pp. 10 - 16 L.R. Klein 1950 Economic fluctuations in the United States, 1921 - 1941. Cowles Commission monograph 11. John Wiley and sons, New York L.R. Klein 1962 An introduction to econometrics. Prentice-Hall Inc. J. Kmenta 1971 Elements of econometrics. Macmillan J. Kraft and 1980 Interfuel substitution and energy A. Kraft consumption in the industrial sector. Applied energy, 6, 1980, pp. 275 - 288 E. Kuh and How extraneous are extraneous estimates. Review of economics J.R. Meyer 1957 and statistics, November 1957. R.C.K. Lee 1964 Optimal estimation, identification and control. Research monograph no 28, MIT press, Cambridge, Massachusetts A.M. Legendre 1806 Nouvelles methods pour la determination des orbits des comets, Paris 1806 D.V. Lindley 1965a Introduction to probability and statistics from a Bayesian viewpoint. Part 1, Probability. Cambridge University press, 1965 D.V. Lindley 1965b Introduction to probability and statistics from a Bayesian viewpoint. Part 2, Inference. Cambridge University press, 1965 D.V. Lindley and Bayes estimates for the linear model. Journal of the Royal A.M.F. Smith 1972 statistical society B 34 pp. 1-41 G.S. Maddala, 1971 The likelihood approach to pooling cross-section and time-series data. Econometrica Vol 39 No 6 November 1971 pp. 939-953 G.S. Maddala, 1977 Econometrics. McGraw-Hill Kogakusha. S. Makridakis 1982 The accuracy of extrapolation et al. (time-series) methods; results of a forecasting competition. Journal of Forecasting, Vol 1, No 2, April - June 1982, pp. 111 - 154 P.D. McNelis and 1982 Policy dependent parameters in the S.N. Neftii presence of optimal learning; an application of Kalman filtering to the Fair and Sargent supply-side equations. The review of economics and statistics, Vol 64, No 2, May 1982, pp. 296 - 306 A. McWhorter, 1976 A sensitivity analysis of varying W.A. Spivey and parameter econometric models. W.K. Wrobleski International Statistical Review, Vol. 44, No. 2, 1976 pp. 265-282 A. McWhorter, 1977 An empirical examination of the G.V.L. Narasimham predictive performance of an and R.S. Simonds econometric model with random coefficients. International statistical review, 45, 1977, pp. 243 - 255 N. Meade 1979 Bivariate forecasting with a variable leadtime. Journal of the operational research society, Vol 30 no 5 R.K. Mehra 1970 On the identification of variance and adaptive Kalman filtering. IEEE transactions on automatic control, April 1970, pp. 175-184 J. Mincer 1969 Models of adaptive forecasting. Chapter 3 in J. Mincer (ed.) Economic forecasts and expectations; analysis of forecasting behaviour and performance. New York; National bureau of economic research, 1969 D.W. Mitchell 1982 Kalman filters and the target values of monetary aggregates. Journal of Money, credit and banking. Vol 14 No 3 August 1982 pp. 365 - 375 D.F. Morrison 1976 Multivariate statistical methods. McGraw-Hill, 1976 S. Muller 1982 Residual analysis in the Bonn forecasting system. No 10, University of Bonn, 1982 Y. Murota 1982 The use of stock-adjustment model to analyse the residential energy demand. Institute of policy science, Saitama University, Urawa, Saitama, Japan J.P.Newhouse and 1971 An evaluation of ridge estimators. S.D. Oman Rand report R-716-PR April 1971 S. Newland 1979 Elasticities of demand for wool, clothing and all fibres; a survey of some econometric models and the results derived from them. International Wool Secretariat, Economics and Market research department, 1979 NIER 1981 National Institute Economic Review, February 1981, p. 25 Published by the National Institute for Economic and Social Research, 1981 W.D. Nordhaus 1977 International studies of the demand (editor) for energy. North-Holland publishing company, 1977 D.A. Pierce 1980 Sources of error in economic time series. Special studies paper no 151, Division of research and statistics, Federal reserve board, Washington D.C. R.S. Pindyck 1979 The structure of world energy demand. MIT 1979 R.L. Plackett 1950 Some theorems in least squares. Biometrika 37 pp. 149-157 H. Raiffa and 1961 Applied statistical decision R. Schlaifer theory. Harvard business school division of research, Boston, 1961 B. Raj and 1981 Econometrics; a varying coefficient A. Ullah approach. Croom Helm, 1981 T.J. Rothenburg 1973 Efficient estimation with a-priori information Cowles foundation monograph 23, Yale university press, New Haven, Conn., 1973 J. Rouhiainen 1978 The problem of changing parameters in demand analysis and forecasting. European review of agricultural economics, vol 5, part 3/4, pp. 349-359 H. Rubin 1950 Note on random coefficients. Chapter XIX in Koopmans (ed.) Statistical inference in dynamic economic models. Wiley : London 1950 L.R. Savage 1954 The foundations of statistics. New York: John Wiley and Sons inc. L.R. Savage 1962 The foundations of statistical inference. New York: John Wiley and Sons inc. B. Singh, A.L. Nagar On the estimation of structural N.K. Choudhry and change : a generalization of the B. Raj 1976 random coefficients regression model. International economic review Vol. 17, No. 2, June 1976 pp. 340-361 J.Q. Smith 1979 A generalization of the Bayesian steady forecasting model. Journal of the Royal statistical society B, Vol 41 no 3 375-387 A.M. Solomon 1980 The multicollinearity problem and a wool consumption model. Msc thesis, Cranfield Institute of Technology A.M. Solomon 1981 A study of the demand for fuels in France, Germany and the U.K. BP Corporate planning department systems division report no. 106, November 1981 D.C. Stapleton 1981 Censored normal regression with measurement error on the and D.J. Young dependent variable. Discussion paper 81-30, Department of Economics, The University of British Columbia, July 1981 C.F. Stevens 1974 On the variability of demand for families of items. Operational research quarterly 25 no 3 pp. 411-420 P.A.V.B. Swamy 1971 Statistical inference in random coefficient regression models. Springer-Verlag, New York. L.D. Taylor, 1976 The residential demand for energy. G.R. Blattenberger Report to the electric power and P.K. Verleger research institute, Department of economics, University of Arizona, Tucson L. Telksnys 1973 Determination of changes in the properties of random processes by the Bayes method. Identification and system parameter estimation (P. Eykhoff, ed.) pp. 763-766. Amsterdam: North Holland H. Thiel and On pure and mixed statistical estimation in economics. A.S. Goldberger 1961 International economic review, 1961 pp. 65-78. J. Tobin 1950 A statistical demand function for food in the USA. Journal of the Royal statistical society, A, vol 113, 1950, pp. 113-141 L. Tornqvist 1957 A method for calculating changes in regression coefficients and inverse matrices corresponding to changes in the set of available data. Skandinavisk aktuarietidskrift, 40, pp. 219-226 D.W. Trigg and Exponential smoothing with an adaptive response rate. Operational A.G. Leach 1967 research quarterly, Vol 18 no 1 H. Tsurumi and A Bayesian test of the product life cycle hypothesis as applied to the Y. Tsurumi 1980 U.S. demand for color-TV sets. International economic review, Vol 21, No 3, October 1980 R.H. Wampler 1970 A report on the accuracy of some widely used least squares programs. Journal of the American statistical association, 1970, vol. 65, pp. 549-565 N. Wiener 1949 Extrapolation, interpolation and smoothing of stationary time series. New York : Wiley 1949. P. Whittle 1969 A view of stochastic control theory. Journal of the Royal statistical society, series A, 132, pp. 320-334 K.J. Wigley and 1982 Methods for projecting UK energy K. Vernon demand used in the Department of energy. DOE research paper, 1982 P.C. Young 1969 Control engineering. 1969, 16, Nos 10 and 11. P.C. Young 1974 Recursive approaches to time series analysis. Bulletin of the institute of mathematics and its applications, May/June 1974, pp. 209-224. R.M. Young 1982 Forecasting with an econometric model. Jornal of forecasting, Vol 1, No 2, April - June 1982 A. Zellner 1971 An Introduction to Bayesian inference in econometrics. Wiley, 1971