« View all new features in
Mathematica
9
◄
previous
|
next
►
New in
Mathematica
9
›
Time Series and Stochastic Differential Equations
Compute Correlation and Partial Correlation Functions
Autoregressive (AR) and moving average (MA) processes.
In[1]:=
X
ar = ARProcess[{-.2, .2, .4}, 1]; ma = MAProcess[{-.2, .2, .4}, 1];
It is difficult to identify the type of process from the sample paths alone.
In[2]:=
X
ListPlot[RandomFunction[#, {0, 100}], Filling -> 0, PlotLabel -> Head[#]] & /@ {ar, ma}
Out[2]=
CorrelationFunction
and
PartialCorrelationFunction
can be used to help identify AR and MA processes.
In[3]:=
X
ListPlot[CorrelationFunction[#, {20}], PlotLabel -> Head[#], Filling -> 0, PlotRange -> {-.5, .5}, PlotStyle -> PointSize[Medium]] & /@ {ar, ma}
Out[3]=
In[4]:=
X
ListPlot[PartialCorrelationFunction[#, {20}], PlotLabel -> Head[#], Filling -> 0, PlotRange -> {-.5, .5}, PlotStyle -> PointSize[Medium]] & /@ {ar, ma}
Out[4]=