S*******e 发帖数: 525 | 1 I tried to use R to decompose time series into Seasonal, Trend... but my
time series has some missing data. So it will produce
Error in na.omit.ts(x) : time series contains internal NAs
Any easy way to work around the problem? | w**********y 发帖数: 1691 | 2 try to use xts. Much more ore convenient.
(x = as.ts(1:5))
x[3] = NA
## na.omit.ts(x)
(x = xts(x,Sys.Date()+1:5))
na.omit(x)
na.locf(x) | S*******e 发帖数: 525 | 3 Thanks a lot. Could you help understand the following chart:
http://blog.magicbeanlab.com/data-viz/decomposing-time-series-d
Why do the trend and random components seem to be shorter than other two
components ? 这个算法不能得到最早和最晚时间段的趋势和随机部分吗?
Thanks again.
【在 w**********y 的大作中提到】 : try to use xts. Much more ore convenient. : (x = as.ts(1:5)) : x[3] = NA : ## na.omit.ts(x) : (x = xts(x,Sys.Date()+1:5)) : na.omit(x) : na.locf(x)
|
|