How to get the OLS estimate from a regression based on a vector?
16 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
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 Commenti
Risposte (1)
Jeff Miller
il 11 Set 2019
Modificato: Jeff Miller
il 11 Set 2019
How about this:
deltay = diff(y);
b = regress(deltay,y(1:end-1));
0 Commenti
Vedere anche
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!