필터 지우기
필터 지우기

Fit an MA model onto a given data set

조회 수: 1 (최근 30일)
Mitul Dattani
Mitul Dattani 2019년 11월 18일
Hi, I need to add an MA(6) model onto a set of data (which is attached).
So far I have plotted the time series, plotted the auto correlation and partial autocorrelation functions, then determined that an MA model would be better suited than an AR, as the partial autocorrelation function was geometric, and the autocorrelation function had 6 significant lag points, and tended towards 0.
I was also unsure at the start when deducing whether or not the model was AR or MA hence why i differenced X to allow for a pattern to be identified.
Im struggling to fit the data onto the MA(6) model.
Any help is much appreciated!
The code I have so far is:
%% 1 (Load and Plot data from the X6 file)
load('X6.mat');
X=X6;
figure(1);plot(X);
%% 2 (Plot autocorrelation and partial autocorrelation)
% figure(2); plot(diff(X)) % Variance not constant therefore plot difference
% figure(3); autocorr(diff(X))
% figure(4); parcorr(diff(X)) % Partial Autocorrelation function geometric, thus MA process
figure(2); autocorr(X)
figure(3); parcorr(X) %MA(6) process
%% 3 (Fit the data to an MA model)
MA6=arima(0,0,6);
MA6.Constant=0;
MA6.Variance=1;
x=simulate(MA6,5000);
autocorr(x)

답변 (0개)

카테고리

Help CenterFile Exchange에서 Graph and Network Algorithms에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by