Do Regressions every 12 periods

조회 수: 3 (최근 30일)
Ana
Ana 2014년 4월 7일
댓글: Star Strider 2014년 4월 7일
Hi! How can I do regressions for a time series data every 12 periods? I mean, I have monthly data and i would like to do a regression for each 12 months, corresponding to a regression every year. Does anyone know how to do this? Thank you.

채택된 답변

Star Strider
Star Strider 2014년 4월 7일
If your data are in a vector, use reshape to create an (Nx12) matrix from it, then do the regressions on the rows.
  댓글 수: 2
Ana
Ana 2014년 4월 7일
Thank you!
Star Strider
Star Strider 2014년 4월 7일
My pleasure!

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by