Anda di halaman 1dari 39

Temporal and Spatial Models

ANOL BHATTACHERJEE, PH.D.


UNIVERSITY OF SOUTH FLORIDA
Outline
 Unique challenges of temporal (time-series) and spatial models.
 Autocorrelation in time-series data.
 Modeling time-series data:
 Trend model
 Additive seasonality model.
 Lag model.
 Autoregression model.
 Modeling spatial data:
 Spatial lag model.
 Assessing model quality:
 Predictive accuracy.
 Model fit.
Example: Coca Cola Sales
Quarter Sales
 Univariate data: Q1-86 1734.83
Q2-86 2244.96
 We have data on quarterly sales (in millions of dollars) from Q1 of 1986 Q3-86 2533.80
to Q4 of 1999, but we have no other data. Q4-86 2154.96
Q1-87 1547.82
 Quarterly sales is dependent on time. Q2-87 2104.41
Q3-87 2014.36
 Goals: Q4-87 1991.75
Q1-88 1869.05
 We want to fit a (non-linear) model to this sales data. Q2-88 2313.63
 We want to use that model to predict future sales from Q1-00 to Q1-01. ……
……
 How can we accomplish this with? Q2-99 5379.00
Q3-99 5195.00
 Can we use OLS regression? No. Why? Q4-99 4803.00
Data: CocaCola.csv
 So what else can we do?
Data Exploration
 Questions:
 What can we learn from this graph?
A. The plot is linear
B. There is a temporal trend
C. There is seasonality
D. There is autocorrelation
E. There is multicollinearity
F. All of the above
G. None of the above
 How can we model this data?
Linear Trend Model
 Recode “Quarter” as follows:  Is this an excellent model or what?
 Q1-86 (first observation in the dataset) is t = 1.  Mult R-sq = 0.89 with just one variable.
 Q2-86 (second observation) is t = 2.  High degree of freedom.
…
 Q4-99 (last observation) is t = 56.
 Regress Sales against t: yt = β0 + β1 * t

m1 <- lm(Sales ~ t, data=d) What does this


coefficient mean?
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 1530.181 105.041 14.57 <2e-16 ***
t 66.828 3.206 20.84 <2e-16 ***

Residual standard error: 387.8 on 54 degrees of freedom


Multiple R-squared: 0.8895, Adjusted R-squared: 0.8874
F-statistic: 434.5 on 1 and 54 DF, p-value: < 2.2e-16
Linear Trend Model
 Questions:
 Based on this model, the forecasted sales for Q1-00 is approximately:
A. $5340 million.
B. $3809 million.
C. $4391 million.

m1 <- lm(Sales ~ t, data=d)

Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 1530.181 105.041 14.57 <2e-16 ***
t 66.828 3.206 20.84 <2e-16 ***

Residual standard error: 387.8 on 54 degrees of freedom


Multiple R-squared: 0.8895, Adjusted R-squared: 0.8874
F-statistic: 434.5 on 1 and 54 DF, p-value: < 2.2e-16
Coca Cola: Linear Trend Model
 Question: Residual vs. Time
 What can we learn from the residual plot?
A. Residuals are independent
B. Residuals are heteroskedastic
C. Residuals are autocorrelated
D. Residuals are biased
E. None of the above
Seasonality
The red line is the linear trend model  There is a periodic pattern in y-variable; this is
called seasonality.
Observations are not independent but are
5000


related to each other in time.
 This quarter’s sales is in proximity to last
4000

quarter’s sales.
Sales

 Data is not independent; hence OLS models are


3000

inappropriate.
 Correlation across time is called auto-
correlation.
2000

 Linear models ignore seasonality.


0 10 20 30 40 50  So how can we model seasonality?
t
Time-Series Data
 Cross-sectional data:
 Different variables measured at the same point in time.
 Multivariate regression used for analysis.
 Time-series data:
 A variable that changes values at different points in time.
 Data observed at regular time intervals, e.g., daily (stock prices), monthly (CPI), quarterly (e.g.,
GDP), annually (budget).
 Multivariate regression not applicable, since data has high autocorrelation and is not i.i.d.
 May have different components:
 Trend: A long-term, relatively smooth pattern (often annual or more).
 Seasonal: A shorter-term pattern that appears in a regular interval (e.g., quarterly, or less than a year).
 Remaining fluctuations: May include random, lagged, or uncontrolled variations.
Temporal and Spatial Models
 Why/when are spatial/temporal models important?
 When observations that are “close” carry important information about the focal observation.
 Close in time: temporal (or time-series) models.

 Close in space: spatial models.

 Examples:
 This quarter’s sales is close to (in time) last quarter’s sales – temporal association.

 A home’s value is close to (in space) home values nearby – spatial association.

 If neighboring observations carry important information, then you should consider spatial
and/or temporal model components.
 In addition to classical regression components.
The Statistical Challenge
 How to incorporate the effect of neighboring (or close) observations?
 Unlike multivariate regression, we are not predicting future values of Y based on independent
variables X, but based on previous values of the same variable Y.
 Temporal dependency:
 If this quarter’s sales depend on last quarter’s sales, then salest = f(salest-1)
 Sales can be modeled as a lag-variable, using Time (t) as a predictor.
 Spatial dependency:
 If a home’s value depends on home values nearby, then the average value of all nearby homes
can be used as a predictor.
 We can also incorporate the variance (volatility) of nearby homes, the max value, min value, etc,
of nearby homes.
Other Challenges of Spatial Models
 Spatial models are usually more challenging than temporal models, because:
 We have to define an appropriate distance metric, such as Euclidian distance.
 Example: Home A is 5 miles from home B and 10 miles from home C.
 Or more generally, define a similarity metric.
 Example: Product A is closer to product B in the associated feature space.
 We must also specify the reach of the spatial dependency:
 Should we only include homes no further than 5 miles away? Or no further than 10 miles away?

 Should we weigh each observation inversely proportional to its distance?


 Incorporating temporal and spatial dependencies is not hard, but requires some intuition and
thinking.
Additive Seasonality Model
 How to incorporate seasonality:
 Seasonality is a categorical variable.
 Add seasonality to a trend model using dummy variables.
 Four quarters in the Coca Cola data implies three dummy variables.
 Seasonal model: Quarter Sales t D D_1 D_2 D_3
 yt = β0 + βt t + β1 D1 + β2 D2 + Q1-86 1734.83 1 1 1 0 0
Q2-86 2244.96 2 2 0 1 0
β3 D3 + e Q3-86 2533.80 3 3 0 0 1
Q4-86 2154.96 4 4 0 0 0
Q1-87 1547.82 5 1 1 0 0
Q2-87 2104.41 6 2 0 1 0
Q3-87 2014.36 7 3 0 0 1
Q4-87 1991.75 8 4 0 0 0
Q1-88 1869.05 9 1 1 0 0
 Interpretation:
 What do the model coefficients mean?
 How does this model compare to the linear trend model?
Comparing Trend and Seasonality Models
Linear trend model
 Questions: m1 <- lm(Sales ~ t, data=d)
 Based on the additive seasonal model,
Estimate Std. Error t value Pr(>|t|)
we conclude that… (Intercept) 1530.181 105.041 14.57 <2e-16 ***
t 66.828 3.206 20.84 <2e-16 ***
A. Sales increase by $67 million per
quarter. Multiple R-squared: 0.8895, Adjusted R-squared: 0.8874
B. Seasonally adjusted sales increase F-statistic: 434.5 on 1 and 54 DF, p-value: < 2.2e-16
by $67 million per quarter. Additive seasonality model (trend + seasonal)
C. Detrended sales increase by $67 m2 <- lm(Sales ~ t + D_1 + D_2 + D_3, data=d)
million per quarter.
Coefficients:
D. None of the above. Estimate Std. Error t value Pr(>|t|)
(Intercept) 1368.286 103.871 13.173 < 2e-16 ***
 Which quarter has the highest sales? t 66.663 2.358 28.268 < 2e-16 ***
D_1 -172.285 107.786 -1.598 0.11613
 How will you test the predictive D_2 505.012 107.657 4.691 2.07e-05 ***
performance of each model? D_3 333.700 107.580 3.102 0.00313 ** ---

Multiple R-squared: 0.9438, Adjusted R-squared: 0.9394


F-statistic: 214 on 4 and 51 DF, p-value: < 2.2e-16
Forecasting with Trend and Seasonality Models
 For Q1-00: Linear trend model
m1 <- lm(Sales ~ t, data=d)
 t = 57, D1 = 1, D2 = 0, D3 = 0
 Trend model: Estimate Std. Error t value Pr(>|t|)
(Intercept) 1530.181 105.041 14.57 <2e-16 ***
 ŷ57 = 1530 + 67*57 = 5349 t 66.828 3.206 20.84 <2e-16 ***

 Seasonality model: Multiple R-squared: 0.8895, Adjusted R-squared: 0.8874


F-statistic: 434.5 on 1 and 54 DF, p-value: < 2.2e-16
 ŷ57 = 1368 + 67*57 – 172*1 = 5015
 For Q4-00: Additive seasonality model
 t = 60, D1 = 0, D2 = 0, D3 = 0 m2 <- lm(Sales ~ t + D_1 + D_2 + D_3, data=d)
 Trend model: Coefficients:
 ŷ60 = 1530 + 67*60 = 5530 Estimate Std. Error t value Pr(>|t|)
(Intercept) 1368.286 103.871 13.173 < 2e-16 ***
 Seasonality model: t 66.663 2.358 28.268 < 2e-16 ***
D_1 -172.285 107.786 -1.598 0.11613
 ŷ60 = 1368 + 67*60 = 5388
D_2 505.012 107.657 4.691 2.07e-05 ***
 Questions: D_3 333.700 107.580 3.102 0.00313 ** ---

 Which is the better model? Why? Multiple R-squared: 0.9438, Adjusted R-squared: 0.9394
F-statistic: 214 on 4 and 51 DF, p-value: < 2.2e-16
Add seasonality model Linear trend model

Actual vs Fitted Actual vs Fitted


Sales Sales

2000 3000 4000 5000 2000 3000 4000 5000

0
0
10

10
20
20

t
t
30

30
40
40
50

50
Residual vs Time Residual vs Time
Res Res

-400 -200 0 200 400 600 -500 0 500


0

0
10

10
20

20
Time

Time
30

30
40

40
Which Model Fits the Data Better

50

50

Residual distribution
Frequency

0 2 4 6 8
-500
0

Mod2
Residuals

500
1000
Predictive Accuracy On Holdout Set
 How to measure predictive performance:
Create training data set and holdout (test) data set.

6000
 Actual
Trend Model
 Training: Q1-86 to Q4-99. Seasonal Model

 Test: Q1-00 to Q1-01.

5500
 Estimate model using test data set and use
estimated model to predict sales for test data.

5000
 Compute root mean square error for test data:

4500
4000
 RMSE (Linear Trend) = $729 million. 56 57 58 59 60 61 62

 RMSE (Additive easonality) = $498 million.


 Seasonal is better because it has less error.
Can the Model be Improved Further?
 Residuals are still autocorrelated.
 Autocorrelation (or serial correlation): Correlation of an observation with itself at different points in time.
 Autocorrelation: r ~ [-1, 1]
 How to detect it:
 Durbin-Watson Test: DW statistic (d) is a measure of autocorrelation.
d ~ 2(1-r) ~ [0, 4]
library(lmtest)
d = 2 implies no autocorrelation. dwtest(m1)
d  0 implies positive autocorrelation. DW = 1.3616, p-value = 0.004523

d  4 implies negative autocorrelation. dwtest(m2)


 AIC, BIC, SBIC, RMSE (lower is better). DW = 0.48736, p-value = 6.245e-12
ACF Plots
 ACF and PACF plots: Linear Trend Model
 Residuals should be randomly distributed around the mean.

1 .0
 Patterns (exponential decay, positive/negative swings, etc.) are

0 .5
bad.

ACF

0 .0
 Two ways of modeling autocorrelation:

-0 .5
 Explicitly (as lag variable): 0 5

Lag
10 15

 Include lagged predictor variables.


 Autoregressive (AR) models. Additive Seasonality Model
Series res

 Implicitly (in the error term):

1.0
 Model response variable as a function of lagged error terms.

0.6
ACF
 Moving average (MA) models.

0.2
-0.2
 Other problems:
0 5 10 15
 Non-zero mean. Lag

 Non-constant error variance.


Series res
Model with Lag Variables
 Model specification
 Yt denote sales at time t.
 Create a “new” variable Yt-1 (lag-1 variable)
 Model Yt = β0 + β1 Yt-1 + ∑βi xi + ε
 Lags may occur for greater than 1 time unit:
 Different lag models (lag-1, lag-2, lag-3, etc.) can be compared to determine optimum lag duration.
 How many lags should we include?

“Lag” Variable
Interpreting Lag Model Results
 Questions:
 The coefficient 0.74 implies that:
A. Last quarter’s sales have no impact.
B. Sales decrease by 0.74 every quarter.
C. Seasonally adjusted and detrended sales increase by
Mult R-sq: 0.9761, Adj R-sq: 0.9736
0.74 every quarter.
D. None of the above.
 How do the results compare against the linear trend and
seasonal models?

Mult R-squared: 0.945, Adj R-sq: 0.9406


Estimate Std. Error Pr(>|t|)
(Intercept) 1519.6000 109.7790 0.0000
t 67.1070 3.3210 0.0000
Mult R-sq: 0.8851, Adj R-sq: 0.8830
Trend vs. Seasonal vs. Lag Models
Linear Trend Trend + Seasonal Trend + Lag + Seasonal

600

400
Residual vs Time

Residual vs Time

Residual vs Time
400

Actual vs Fitted
500

200
200
Res
Res

Res

0
0
0

-200

-200
-500

-400
0 10 20 30 40 50 0 10 20 30 40 50 0 10 20 30 40 50

Time Time Time

Trend + Lag + Seasonal Trend + Lag + Seasonal RMSE Trend = $729 million
RMSE Trend +Seas = $498 million
6000
Actual
5000

Trend Model
Seasonal Model

RMSE Trend + Lag + Seas = $332 million


Holdout Sample Lag & Season

5500
4000
Sales

5000
3000

4500
2000

4000

0 10 20 30 40 50 56 57 58 59 60 61 62

t
ACF Plots
Series res Series res

1.0

1.0
1 .0

0.6

0.6
0 .5

ACF

ACF
0.2
ACF

0.2
0 .0

-0.2

-0.2
0 5 10 15 0 5 10 15
-0 .5

0 5 10 15

Lag
Lag Lag

Trend Model Trend +Series


Seasonal
res
Model Trend + Seasonal
Series res
+ Lag Model
0.6

0.2
 Questions:

Partial ACF
Partial ACF

0.0
0.2

 Which is the best of the three above model?

-0.2
-0.2

 In a lag model, how many lags should we consider?


5 10 15 5 10 15

 Do we really need trend and seasonality if we include sufficient number of lags?


Lag Lag

 Anything else that may lead to better forecasting of time-series models?


Autoregressive (AR) Models
 A model in which Yt depends only on its own past values Yt-1, Yt-2, …Yt-p.
 A lagged model, with multiple possible lags.
 Model specification: AR(p) model, with p parameters:
Yt = �0 + �1 Yt-1 + �2 Yt-2 +… + �p Yt-p + �t
 AR(0) model: Yt = �0 + �t
 AR(1) or first-order autoregressive model: Yt = �0 + �1 Yt-1 + �t
 AR(2) or second-order autoregressive model: Yt = �0 + �1 Yt-1 + �2 Yt-2 + �t
 How many past values to use?
 Little explanatory utility beyond 3 or 4 lags; hence we usually we stop at 3 or 4.
 Value of p set by modeler based on understanding of the context.
MA, ARMA, and ARIMA Models
 Moving average (MA) model:
 A model in which Yt depends only on random error terms �t , �t-1, �t-2, …
 Model specification: Yt = �0 + �t + �1 � t-1 + �2 �t-2 +… �q �t-q
 Ideally, error terms �t should have a zero mean and constant variance �2 (“white noise”).
 Intended to account for endogeneity (omitted variables) in time-series models.
 Autoregressive moving average (ARMA) model:
 Has both AR and MA terms.
 Model specification: Yt = �0 + �1 Yt-1 + �2 Yt-2 +… + �p Yt-p + �t + �1 � t-1 + �2 �t-2 +… �q �t-q
 ARMA models require two pre-specified parameters: p (number of past lag values) and q (number
of white noise disturbances).
 Autoregressive integrated moving average (ARIMA) model:
 ARMA models with difference terms to account for stationarity.
 Differentiation forces zero mean and constant error variance.
Stationarity of Time Series
 Series Yt is “strictly stationary” if the mean, variance, and covariance of Y t are time-invariant.
E(Y1) = E(Y2) = … = E(Yt) = � ( a constant)
Var(Y1) = Var(Y2) = … = Var(Yt) = �2 ( a constant)
Cov(Y1, Y1+k) = Cov(Y2, Y2+k) = … = Cov(Yk-1, Yk) = � (a constant)
 Series Yt is “weakly stationary” or “covariance stationary” if the first two conditions are met, but
covariance depends only on lag k.
Cov(Y1, Y1+k) = Cov(Y2, Y2+k) = … = Cov(Yp, Yp+k) = �k
 Why stationarity is important:
 Estimators are biased if a time-series is not stationary.
 A series that is not stationary can be made stationary via differencing.
 A series that becomes stationary after differencing once is integrated of order 1 or I(1).
 A series that becomes stationary after differencing d times is integrated of order d or I(d).
 A series that is stationary without differencing is I(0).
Estimating ARIMA Models
 Box-Jenkins Methodology:
 Works only on stationary time-series variables.
 Three steps:
 Identification:
 Check for stationarity; if time-series is not stationary, difference it until it becomes stationary.
 Estimate d in I(d) as number of differentiation applied.
 Estimation:
 If time-series is stationary, estimate lag values p and q for AR(p) and MA(q) using ACF and PACF plots.

 Modeling:
 Run ARIMA model using p, d, and q values.

 Diagnostic checking:
 Compare model statistics (AIC, BIC, SBIC) to choose the best model.
 Plot residual ACF: should be random (no pattern), i.e., white noise.
ACF and PACF
 Autocorrelation Function (ACF):
 Measures correlation between observation Yt and observation Yt-p located p periods apart.
�k = Corr (Yt , Yt-p) = Cov (Yt , Yt-p) / (√Var (Yt) * √Var (Yt-p) = �p/ �0
 Estimates how many past values may be related to Yt, i.e., the lag p in AR(p) models.
 Partial autocorrelation function (PACF):
 Measures correlation between residual �t and �t-q located q periods apart.
 Autocorrelation of a signal with itself at different points in time, when the linear dependency of that signal at
shorter lags removed.
 Used to estimate lag q in MA(q) models.
AirPassengers Data
 Monthly ticket sales counts (in thousands) for 1949-1960.
 We wish to predict ticket sales for the next 5 years.
data(AirPassengers)
ts <­ AirPassengers
ts
start(ts)
end(ts)
class(ts)
frequency(ts)
cycle(ts)

plot(ts)
abline(lm(ts ~ time(ts)), col="red”)
boxplot(ts ~ cycle(ts))

 Questions:
 What are we trying to depict in this boxplot?
 What inferences can we draw from this boxplot?
AirPassengers: Stationarity
plot(ts)  Questions:
abline(lm(ts ~ time(ts)), col="red")
plot(log(ts))   What did the log transform do?
plot(diff(log(ts)))  What did the differencing do?
 Do we have a stationary time series?

Linear Trend Plot


ARIMA parameter: d=1
AirPassengers: ACF and PACF Estimation
acf(ts)
acf(diff(log(ts)))
ARIMA parameters: p=2, d=1, q=1
pacf(diff(log(ts))) Look for when ACF and PACF functions change signs
adf.test(diff(log(ts)))

Lag 0
Lag 0
Lag 1
Lag 2(p=2)

Lag 1 (q=1)
AirPassengers: ARIMA with Cross-Validation
model <­ arima(log(ts), c(2,1,1), seasonal=list(order=c(2,1,1), period=12))
predicted <­ predict(model, n.ahead=5*12)
predicted <­ 2.718282^predicted$pred
predicted <­ round(predicted,0)
predicted
ts.plot(ts, predicted, lty=c(1,3))

# Cross­validation
train <­ ts(ts, frequency=12, start=c(1949,1), end=c(1958,12))
model <­ arima(log(train), c(2,1,1),                                
    seasonal=list(order=c(2,1,1), period=12))
predicted <­ predict(model, n.ahead=2*12)
predicted <­ 2.718282^predicted$pred Training data: 1949-1958
predicted <­ round(predicted,0) Test data: 1959-1960
original <­ tail(ts, 24)
original – predicted

RMSE <­ sqrt(1/24*sum((original ­ predicted)^2))
Spatial Models
 Basic idea is similar to that of temporal models:
 We want to account for the information due to neighboring observations.
 More complex than temporal models since spatial dependency evolves continuously in a 2-
dimensional (or sometimes higher-dimensional) space.
Example: Baltimore House Prices
 Goal: To estimate factors that determine price of real estate
 We have data on house characteristics (bedrooms, bathrooms, patio, fireplace, AC, etc.) and
geographical location (longitude, latitude, coded as X and Y) for a sample of Baltimore homes.
 We also have the selling price (in thousands of dollars).

ID PRICE NBROOM DWELL NBATH PATIO FIREPL AC X Y


1 47 4 0 1 0 0 0 907 534
2 113 7 1 2.5 1 1 1 922 574
3 165 7 1 2.5 1 1 0 920 581
4 104.3 7 1 2.5 1 1 1 923 578
5 62.5 7 1 1.5 1 1 0 918 574
6 70 6 1 2.5 1 1 0 900 577
7 127.5 6 1 2.5 1 1 1 918 576
8 53 8 1 1.5 1 0 0 907 576

Multiple R-squared: 0.5152,


 Questions: Adjusted R-squared: 0.5033
 How do we interpret the numbers in red ovals?
 What can we learn from this model?
Spatial Plot of House Prices
Baltimore House Prices

580

580
150
570
560

560
550

100

Latitude
540

540
530

50

520
520
510

860 880 900 920 940 960 980


860 880 900 920 940 960 980

Longitude

 The colors and diamond size are proportional to the price of a house.
 What can we learn from this graph?
 How can we model this effect?
How to Measure ‘Space’?
 We must define space in order to measure its effects.
 Naive method: Regional dummy variables, e.g., for zip codes.
 Weight matrix: n x n neighborhood structure, where: 0 = not neighbor, 1 = neighbor.
Sample Region and Units Simple Neighborhood Matrix
1 2 3 4 5 6 7 8 9
1 2 3 1 0 1 0 1 0 0 0 0 0
2 1 0 1 0 1 0 0 0 0
3 0 1 0 0 0 1 0 0 0
4 5 6 4 1 0 0 0 1 0 1 0 0
5 0 1 0 1 0 1 0 1 0
6 0 0 1 0 1 0 0 0 1
7 0 0 0 1 0 0 0 1 0
7 8 9 8 0 0 0 0 1 0 1 0 1
9 0 0 0 0 0 1 0 0 0
Spatial Lag Model
Initial OLS Model (AIC OLS = 1793)
 Spatial autocorrelation in response variable:
Y = ρWY + �X + ε
W: spatial weight; ρ: spatial coefficient
 Incorporates spatial effects by including a spatially lagged
dependent variable as an additional predictor.
 OLS vs. spatial lag results: Spatial Lag Model (AIC Spatial Lag = 1739)
 Some of the estimates are smaller in the lag model. Estimate Std. Error Pvalue
(Intercept) -2.6764 4.8670 0.5824
 Intercept term switched signs and is no longer significant. NBROOM 1.2673 1.0487 0.2269
NBATH 7.6529 1.8711 0.0000
 What happened? Which model is better? PATIO 11.9579 2.9539 0.0001
FIREPL 11.1740 2.6072 0.0000
AC 8.4183 2.4014 0.0005
Spatial coefficient:
Rho: 0.49961; p-value: 6.6502e-14
OLS vs. Spatial Lag
 Certain predictors (e.g., presence of patio or fireplace) lost their importance in predicting home
prices when neighboring homes are included (using spatial lag ρWy).
 Why?
 Houses located in the same area tend to have similar features, e.g., fireplaces and patios in
wealthy neighborhoods, no central AC in poorer neighborhoods.
 Hence, prices of neighboring houses already factor in the price effect of these “expected” features.
 Lack of these features may change the price a little but not by much.
 Implication:
 Better to buy a low-end house in an expensive neighborhood rather than a high-end house in an
inexpensive neighborhood?
Key Takeaways
 Modeling temporal and spatial dependencies in data presents unique challenges such as
autocorrelation and location correlation.
 Statistical models available to account for these dependencies.
 Additive seasonality model.
 Lag model.
 AR, MA, ARMA, ARIMA models.
 Spatial lag model.
 Assessing model quality:
 Use estimates from training set to predict values in test set (predictive accuracy).
 Alternative measures of model fit such as AIC and visual examination of residuals are needed.
 Such analysis provide better insight into relationship among data not available from OLS
models.

Anda mungkin juga menyukai