How to call a function over a rolling window of data?
Afficher commentaires plus anciens
I have a panel dataset with T=80 and N=23. I want to call a function over the rolling window of data with 20 periods in each window. Simply put, I want MATLAB to read my data as a numeric matrix (T*N). Pick the first 20 observations (T=1 to T=20), estimate the model and save the results. Then, pick up data over a rolling window (T=2 to T=21, T=3 to T=22... and so on), estimate the models and save results. So, the model will be estimated 64 times with 64 result matrices. How do I create the loop for this operation?
Thank you!
Réponse acceptée
Plus de réponses (0)
Catégories
En savoir plus sur Matrix Indexing dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!