필터 지우기
필터 지우기

How to do a yearly regression?

조회 수: 1 (최근 30일)
Malene Brautaset
Malene Brautaset 2022년 3월 31일
답변: Shreeya 2023년 9월 22일
Hello,
We have accounting data from 2010 - 2020, and want to do one regression year by year such as showed above.
The photo below shows how our data is displayed. Hope someone can help.

답변 (1개)

Shreeya
Shreeya 2023년 9월 22일
I understand you want to perform an year wise regression on the this dataset. You can follow the below steps to achieve this
  • Import the dataset to the MATLAB workspace into a variable called "trainingData".
  • Inside a "for" loop, index the dataset to seperate the data of all the years. For example:
trainingData2010 = trainingData(trainingData.year == 2010,:);
I hope this is helpful in addressing your query.

카테고리

Help CenterFile Exchange에서 Interactive Control and Callbacks에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by