在 R 中将 xts 转换为 ts 对象时了解频率参数

Understand frequency parameter while converting xts to ts object in R

下面频率是什么意思;当我将我的 xts 对象转换为 ts 对象并尝试打印 ts 对象时,我得到了以下信息。 我的数据是每小时数据。但我不明白这个频率是如何计算出来的。我想确保我的 ts 对象将我的数据视为每小时数据。

Time Series:
Start = 1 
End = 15548401 
Frequency = 0.000277777777777778 (how this is equivalent to hourly frequency?)

所以,我的数据框看起来像下面这样:

                   y
1484337600  19.22819            
1484341200  19.28906            
1484344800  19.28228            
1484348400  19.21669            
1484352000  19.32759            
1484355600  19.21833            
1484359200  19.20626            
1484362800  19.28737            
1484366400  19.20651            
1484370000  19.18424 

它有纪元时间和值。此数据框中的纪元时间为 row.names。

现在,我使用 --

转换为 xts 对象
xts_dataframe <- xts(x = dataframe$y,
  order.by = as.POSIXct(as.numeric(row.names(dataframe)), origin="1970-01-01")) 

ts_dataframe <- as.ts(xts_dataframe)

请指出我做错了什么?基本上我想将我的初始数据帧转换为 ts() 对象,因为我需要在其上应用 ARIMA。这个数据是每小时的数据。我真的很难使用它。

frequency 等同于 1/deltat,其中 deltat 是连续观测值之间采样周期的分数。 ?frequency 给出的例子是 deltat 将是“每月数据的 1/12”。

在每小时数据的情况下,deltat是3600,因为一个小时有3600秒。由于 frequency = 1 / deltat,这意味着 frequency = 1 / 3600,或 0.0002777778