Analyze Time Series Model Residuals
Analyze Time Series Model Residuals
Fit a MAProcess[3] to the data:
data = TemporalData[Automatic, {{{0.359431952050076, 0.1866539833635727, -0.36641699166840047,
-0.9169379467434212, -0.4466564157696784, 0.48031513860278385, -0.2340607103049802,
-0.2730210796929566, -0.36790928767225356, -0.5061302867683104, -0 ... 920204587889013, 0.04108386026226077, -0.20607652828229475, -0.8054771629790362,
-0.6105816570028402, -0.05614428001553993, -0.3663737673270948, 0.387029925025942}},
{{1, 5000, 1}}, 1, {"Continuous", 1}, {"Discrete", 1}, 1, {}}, False, 9.];model = EstimatedProcess[data, MAProcess[3]]Use KalmanFilter to find residuals and plot the histogram:
residuals = Rest[data["PathStates"] - KalmanFilter[model, data]["PathStates"]];
Histogram[residuals]DistributionFitTest[residuals, Automatic, {"TestDataTable", All}]