**Introduction:**

These are results and code for the
problems and examples found in Chapter 4 of this famous book.

- Functions for Forecasting Implemented in this Chapter:
- gen_global_linear_seasonal_indicator_X.m (constructs the design matrix X for a global linear seasonal indicator model)
- gen_global_linear_seasonal_trigonometric_X.m (constructs the design matrix X for a global linear seasonal trigonometric model)
- gen_seasonal_indicator_F.m (generates the F matrix for a local linear seasonal indicator model)
- gen_seasonal_indicator_L.m (generates the L matrix for a local linear seasonal indicator model)
- gen_seasonal_trigonometric_F.m (generates the F matrix for a local linear seasonal trigonometric model)
- gen_seasonal_trigonometric_L.m (generates the L matrix for a local linear seasonal trigonometric model)
- locally_constant_indicator_model.m (the recursive update of the locally linear model coefficients)
- locally_constant_indicator_model_optimum.m (finds the optimum relaxation coefficient to use with a locally constant indicator model)
- locally_constant_trigonometric_model.m (the recursive update of the locally trigonometric model coefficients)
- locally_constant_trigonometric_model_optimum.m (finds the optimum relaxation coefficient to use with a locally constant trigonometric model)
- plot_SACF.m (plots the sample autocorrelation function with more accurate error bounds)
- plot_SPACF.m (computes and plots the partial sample autocorrelation function)

- Examples from the book:
- example_4_1.m (Duplicates Example 4.1 from the book)
- example_4_2.m (Duplicates Example 4.2 from the book)
- example_4_3.m (Duplicates Example 4.3 from the book)
- section_4_3_1.m (Duplicates the example in this section of the book)
- section_4_3_2.m (Duplicates the example in this section of the book)

- Data sets considered in this chapter:
- load_housing_starts.m (loads the housing starts data set)
- load_monthly_car_sales.m (loads the monthly US car sales Jan 1960 - December 1968)
- load_monthly_us_retail_sales.m (loads the retail sales data set)
- load_quarterly_new_plant_equipment.m (loads the quarterly new plant equipment data set)

- Problems:
- prob_4_1.m (performs the needed matrix inverses)
- prob_4_2.m (performs the needed matrix inverse)
- prob_4_3.nb (performs the some algebra for this problem)
- prob_4_5.m (performs seasonal regression on the US retail sales data)
- prob_4_6.m (performs seasonal regression on the housing starts data set)

John Weatherwax Last modified: Sun May 15 08:46:34 EDT 2005