Analyzing Daily/Weekly data using ts in R

前端 未结 5 715
暗喜
暗喜 2020-11-30 01:22

I have just started playing with the ts class to analyze some time series data I have.

I am getting a sense that the ts class is not well s

5条回答
  •  自闭症患者
    2020-11-30 02:12

    The ts class is suitable for any type of data that has strictly metronomic intervals between observations. Whether that interval is years, months, days, minutes doesn't make any difference. This makes it very suitable for much scientific data, e.g. weather observations.

    However, a large class of time-related data has gaps. Take for example stock closing prices which doesn't exist for weekend days. For this type of data you'd be better off using the packages xts (extensible time series) or zoo(Z's ordered observations - where Z is the initial of one of the package authors).

    Links to CRAN:

    • xts
    • zoo

提交回复
热议问题