How to get the OLS estimate from a regression based on a vector?
17 ビュー (過去 30 日間)
古いコメントを表示
I have a vector y of dimension nx1. I want to get the OLS estimate of the regression of Δy on y_t-1 (t=1,2...n). How can I do it?
0 件のコメント
回答 (1 件)
Jeff Miller
2019 年 9 月 11 日
編集済み: Jeff Miller
2019 年 9 月 11 日
How about this:
deltay = diff(y);
b = regress(deltay,y(1:end-1));
0 件のコメント
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!