I am trying to use pmcov()
function of MATLAB to calculate power spectral density estimates (PSD) of a discrete time signal 700 ms long with sampling frequency 1000 Hz. This function requires the model order of the autoregressive model used to produce the PSD estimates.
How can I estimate this model order to predict the correctness of the fit?. I came know that there are few criterion like AIC
,BIC
,GIC
which can be used to estimate model order but could not find how to use them in matlab. Can anyone help? My input time signal is a [700 129]
matrix.
Thanks a lot!
If your signals are reliably smooth, you could probably just look at the autocorrelation function for each trial and pick the set the order as the lag when the ACF starts to decay.
If you want to get a more quantitative fit (which is probably easier than eyeballing and generalizing 129 signals). You can fit an AR model
First thing you'll do is choose the order range you want to evaluate (I would look at the ACF for a couple of signals and pick an order where there's relatively no signal in the ACF).
Now you'll iterate through each order possibility and compute the AIC, BIC. Lower values == better fit.
So now you have your BIC scores you want to pick the lowest. In this case I use the mean across signals, if you want to be real careful I would look at the distributions and pick a low
median with a tight distribution. You could also use the AIC to evaluate.