How to remove a year from a dataset without having the value 0

2 ビュー (過去 30 日間)
Kristine
Kristine 2015 年 3 月 11 日
コメント済み: Kristine 2015 年 3 月 18 日
I have a 30-year long data set where two of the years (2009 and 2010) have almost no data. How can I remove these two years without having it for example affect the linear trend?
Help is grealty appreciated.
-Kristine
  2 件のコメント
dpb
dpb 2015 年 3 月 12 日
編集済み: dpb 2015 年 3 月 12 日
What's actually plotted in the figure--average or somesuch over each year as a single point? Can't really tell since there are no markers.
I don't see much trend of any sort; linear or not.
If you don't want to consider a couple of years, simply remove those data from the set but keep the actual year--you'll have a hole but that's just the way time is; "it keeps everything from happening at once".
ADDENDUM
That is, remove both the time and the response variables for those years not considered; shorten the overall series by that number of observations, don't just fixup the observations and leave the time values.
Kristine
Kristine 2015 年 3 月 18 日
The figure is of daily wind direction from NE (22.5-67.5 degrees). Okay, I'll try that. Thank you!

サインインしてコメントする。

採用された回答

Andrew P
Andrew P 2015 年 3 月 12 日
編集済み: Andrew P 2015 年 3 月 12 日
There are quite a few methods for regression with missing data:
You could use something like 'ecmlsrmle' which performs least square regression on datasets with missing values, where the missing values have been replaced with NaNs:
  1 件のコメント
Kristine
Kristine 2015 年 3 月 18 日
Just one more question. I really do not understand what I should input for Data and Design, could you explains this for me?
-Kristine

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeLinear and Nonlinear Regression についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by