I have Matlab R2008b installed. I have self-acquired time-series data for blood pressure variation with a sampling time of 0.05s. My aim is to establish an arma model in order to forecast next(unacquired) values. Thanks to AIC i found that orders [4 2] would better fit my data.
I first extracted 10sec of data to create a training set, established my model on the training set and used the forecast function posted by Rajiv Singh.
I expected to have forecasted data that i would have compared to my real data (validation set). Unfortunately, the forecasted data quickly converge towards 0 after a few oscillations.
I also plotted the fitting percentage vs step ahead prediction to see how fast it decreases.
trainiddata = iddata(trainy,[],Ts); %Create time-series iddata obj
mod=armax(trainiddata,[4 2]); %create arma model
yf=forecast(mod,trainiddata,10*Fs); %Forecast for 10 secs
FITV=[];%Empty vector
for(i=1:100) [YH, FIT, X0] = compare(mod,trainiddata,i); %Retrieve fitting for i-step ahead prediction
FITV=[FITM;FIT]; end subplot(211) plot(trainiddata) hold on plot(yf,'r.'); subplot(212) plot(FITV);
How comes that my model's forecasting power is limited to such a short future ? Am I doing something wrong ?
I also tried an arma[100 10] model, which gives a slightly better result but still cannot predict a peak.
Best Answer