How can I generate an AR(1) process with function filter.m?
4 ビュー (過去 30 日間)
古いコメントを表示
I tried with this code, but I'm not sure about the result...
e=randn(500,1) b=[1 phi]; y=filter(b,1,e);
Note: phi is the coefficient of the lagged variable.
0 件のコメント
回答 (1 件)
Roger Wohlwend
2014 年 9 月 24 日
You did not implement an AR(1) but an MA(1) process. It is not possible to generate an AR(1) process with the function filter. You have to do it with a for-loop - or use certain functions of the Econometrics toolbox.
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で PHY Components についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!