How to remove a year from a dataset without having the value 0
3 次查看(过去 30 天)
显示 更早的评论
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
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.
采纳的回答
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Linear and Nonlinear Regression 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!