bayesian information criterion

5 ビュー (過去 30 日間)
Hjh
Hjh 2012 年 3 月 18 日
Hi guys, I am trying to figure out how to combine the input and output data into the ARX model and then apply it into the BIC (Bayesian Information Criterion) formula. Below is the code that I am currently working on:
for i=1:30; %%Set Model Order
data=iddata(output,input,1);
model = arx(data,[8 9 i]);
yp = predict(model,data);
ye = regress(data,yp{1,1}(1:4018,1));
M(i) = var(yp);
BIC(i)=(N+i*(log(N)-1))/(N-i)*log(M(i));
end
But it does not work. It keep on giving me an error something like below:
"The syntax "Data{...}" is not supported. Use the "getexp" command to
extract individual experiments from an IDDATA object."
I did not understand what does that mean. Can someone explain it to me and where do I do wrong on my piece of code?
Thanks in advance.
Jah.
  3 件のコメント
Hjh
Hjh 2012 年 3 月 20 日
I already run this code with my data. But there is still an error. Do you know where my mistakes is?
Oleg Komarov
Oleg Komarov 2012 年 3 月 20 日
Yes YOU did, but what about us? Do you think we can imagine your data? Sometimes it is possible, but in this case I think it would help if you gave us some sample data.

サインインしてコメントする。

回答 (1 件)

Rajiv Singh
Rajiv Singh 2012 年 3 月 24 日
What does class(yp) reveal? If it is iddata, you would need to use yp.y(1:4018) to retrieve the predicted response data used in regress command.

カテゴリ

Help Center および File ExchangeNonlinear ARX Models についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by