arxstruct
command help me to selects best ARX system order with a dataset data
of input and output:
NN = struc(1:5,1:5,1);
and
nn = selstruc(V,0);
m = arx(z,nn);
matlab selects best model order for an ARX system, but I don't find a way to do it with other systems (ARMAX, OE, BJ). So I tried with for cycles like:
modARMAX = cell(5,5,5);
PE_armax = zeros(5,5,5);
nk = 0;
for na = 1:5
for nb = 1:5
for nc = 1:5
modARMAX{na,nb,nc} = armax(data, [na,nb,nc,nk]);
PE_armax(na,nb,nc)=fpe(modARMAX{na,nb,nc});
end
end
end
where PE_armax is a vector of prediction errors and I find those indices of modARMAX for PER_armax minimum. But with cycles above matlab is too slow if model has more coefficients (like BJ).