Title: Re: Query: time series model implementation
Author: Dave Reilly
Date: 6 Aug 1998 06:23:50 -0700
In article <6qbhbu$j0t$1@nnrp1.dejanews.com, mashuha@my-dejanews.com says... Dear all, I have developed a model to model a time series data, in SAS/ETS and it's regression with AR(1) errors. It looks like this: Series1 = Seasonal Dummies + Series2 + Series3 + AR(1) There are 6 dummies, describing weekly seasonality, since the data is daily. I need to implement that model in MS Excel, so it will be usable by others who don't have SAS, i.e. they will be entering values of Series2 and Series3 and get back prediction for Series1. I am not sure how to do that, how to put AR(1) in? I will be really grateful for a advice, Maria. -----== Posted via Deja News, The Leader in Internet Discussion ==----- Create Your Own Free Member Forum What you have is a particular , and not necessarily optimal , case of a Transfer Function. A general expression for a single input Transfer Function is as follows ( without a constant ) is W(B) T(B) Y(t) = -------- X(t) + ---------- A(t) D(B) P(B) You have specified the following form W(B) 1 Y(t) = -------- X(t) + ---------- A(t) 1 P(B) Simply clear fractions using you equation and get P(B) Y(t) = W(B)*P(B) * X(t) + A(t) where P(B) = 1 -PHI1*B and B is the backshift operator sometimes referred to as L or lag operator and W(B) is by your specification simply W0*B**0 or W0 In terms of your model Y(t) = PHI1*Y(t-1) + W0*X(t) - PHI1*W0*X(t-1) where PHI1 is your AR(1) coefficient and W0 is your regression coefficient. Note also that the constant in the model ( not shown here ) would have to be modified by the multiplier ( 1-PHI1 ) thus the prediction would be Y(t) = PHI1*Y(t-1) + W0*X(t) - PHI1*W0*X(t-1) + (1-PHI1)*YOURCONSTANT Dave Reilly Automatic Forecasting Systems 215-675-0652 P.S. A transfer function can be expressed as a lagged autoregression in all variables in the model. Some software packages (AUTOBOX for one) reports this form so users can go directly to spreadsheets for the purposes that you require. Care should be taken to deal with gaussian violations such as Outliers (pulses) , Level Shifts , Seasonal Pulses , Local time trends , changes in variance , changes in parameters, changes in models ...... just to name a few .. P.S.S. Of course the form of W(B) , D(B) , T(B) and P(B) should never be assumed just because your current software is restricted to easy choices. Aggressively do model diagnostic checking to verify the assumptions that you are making in order to either augment or reduce the model form. To get some ideas on how to do that please go to http://www.autobox.com and pursue Modeling Hints.