How to get the OLS estimate from a regression based on a vector?
7 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
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 Kommentare
Antworten (1)
Jeff Miller
am 11 Sep. 2019
Bearbeitet: Jeff Miller
am 11 Sep. 2019
How about this:
deltay = diff(y);
b = regress(deltay,y(1:end-1));
0 Kommentare
Siehe auch
Kategorien
Mehr zu Linear Regression finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!