3/31/2010
Lecture objectives
Definition
3/31/2010
OR : X t Tt St Ct Rt
where :
X t value of the series at time t
Tt trend componded of the series
St cyclical or seasonal component with a period S
Rt random effect for which we have no explanatio n
This idea is very old and is now out of favor but it is still
widely used
3/31/2010
Make a forecast
Understand the underlying mechanism
Method for reducing the series to some kind of standard
random noise
One will usually jump around from one attempt after another
of trying to develop each of the three components
3/31/2010
Applications
RS image analysis
Medicine
epidemic analysis
3/31/2010
3.
4.
3/31/2010
Terminology
Terminology
3/31/2010
What is a trend?
X t s X t X t s X t 2 s ...
Trends can be increasing or decreasing, and can have
many function forms
Exponential
Quadratic or other polynomial
Identifying a trend
3/31/2010
RESIDUALS
3/31/2010
Example
Example
T 34.92 0.017t
10
3/31/2010
Detrended data X t T
X t (34.92 0.017t )
The detrended data has still the seasonal (S) and the
irregular () components
However, this type of line often does not capture the
trend well because the trend is not quite linear
11
3/31/2010
Seasonality
Types of seasonality
X t Tt St t
where :
X t the value of the series at time t
Tt the mean level of the series at time t
St seasonal effect at time t
t random error
12
3/31/2010
Types of seasonality
X t Tt * St t
X t Tt * St * t
13
3/31/2010
Example
There may be a
seasonal effect (roughly)
corresponding to a
yearly cycle
Example
14
3/31/2010
Removing seasonality
Residuals = error
Fitted model
15
3/31/2010
Random error
2.
3.
16
3/31/2010
No statistics, really
These concepts will reappear over and over with the different
methods used
Descriptive Analysis
17
3/31/2010
3.
4.
Plotting
> mloa<-read.table("C:/Users/Eroot/Quant/R/monaloa.txt",
header=T, sep=",")
> names(mloa)
[1] "year"
"month"
"mean"
"interp"
18
3/31/2010
Plotting
> boxplot(mlco2~cycle(mlco2))
19
3/31/2010
Classical decomposition
> mlco2.dec<-decompose(mlco2, type="mult")
> plot(mlco2.dec)
Plotting
20
3/31/2010
Transforming
> logAP<-log(AP)
> plot(logAP, ylab="Air Passengers (1000s)")
Just like the spatial data weve been discussing for the past
month!
21
3/31/2010
t 1
r1
N
( N 1) ( xt x ) 2 / N
t 1
How is the observation at time t correlated with that at time t2? Or at time t-3? Or at time t-k?
22
3/31/2010
Example
Plotting autocorrelation
Correlation at lag 2
r1 = 0.09; p=0.06
23
3/31/2010
The correlogram
Random series
Short-term correlation
Non-stationary series
Seasonal series
Example
r2=0.6
95% CI around the null
hypothesis for rn=0
r3=0.1
24
3/31/2010
25
3/31/2010
26