# 系列相関の検定

ARProcessのランダムなサンプルを生成する．

 In[1]:= XarData = RandomFunction[ARProcess[{.3, .5, -.2}, 1], {1000}];

 In[2]:= XListPlot[CorrelationFunction[arData, {20}], Filling -> Axis, PlotRange -> All]
 Out[2]=

 In[3]:= XAutocorrelationTest[arData, 10, {"TestDataTable", All}]
 Out[3]=

 In[4]:= XAutocorrelationTest[arData, 10, {"TestConclusion", All}]
 Out[4]=

GARCHProcessからランダムなサンプルを生成する．

 In[5]:= Xgarch = GARCHProcess[.4, {.3, .4}, {.2}]; BlockRandom[SeedRandom["Mathematica 10"]; garchData = RandomFunction[garch, {10^2}, 10^5];]

 In[6]:= XListPlot[CorrelationFunction[garchData, {10}], Filling -> Axis, PlotRange -> All, PlotStyle -> PointSize[Medium]]
 Out[6]=

AutocorrelationTestで最初の経路をチェックする．

 In[7]:= XAutocorrelationTest[garchData["Path", 1], 10, {"TestDataTable", All}]
 Out[7]=
 In[8]:= XAutocorrelationTest[garchData["Path", 1], 10, {"TestConclusion", All}]
 Out[8]=

 In[9]:= Xgarch0 = garchData["SliceData", 0];
 In[10]:= Xslices = Table[garchData["SliceData", k], {k, 1, 4}];

 In[11]:= XDistributeDefinitions[garch0]; LaunchKernels[]; tests = ParallelMap[ IndependenceTest[ garch0, #, {"ShortTestConclusion", "HoeffdingD"}] &, slices];

 Out[12]=

## Mathematica

Questions? Comments? Contact a Wolfram expert »