简体   繁体   English

R中的时间序列建模

[英]Time series modeling in R

I have got a question about modeling time series in R. My data consist of the following matrix: 我有一个关于在R中建模时间序列的问题。我的数据由以下矩阵组成:

1   0.03333333 0.01111111 0.9555556
2   0.03810624 0.02309469 0.9387991
3   0.00000000 0.03846154 0.9615385
4   0.03776683 0.03119869 0.9310345
5   0.06606607 0.01201201 0.9219219
6   0.03900325 0.02058505 0.9404117
7   0.03125000 0.01562500 0.9531250
8   0.00000000 0.00000000 1.0000000
9   0.04927885 0.01802885 0.9326923
10  0.06106870 0.02290076 0.9160305
11  0.03846154 0.00000000 0.9615385
12  0.00000000 0.00000000 1.0000000
13  0.06028636 0.03843256 0.9012811
14  0.09646302 0.05144695 0.8520900
15  0.04444444 0.06666667 0.8888889

This matrix has in total 200 rows. 该矩阵共有200行。

As you can see, in each situation the sum of each row is 1, that is because the values are the percentage of a whole. 如您所见,在每种情况下,每行的总和为1,这是因为值是整体的百分比。 For example row 1 contains 3.33% of variable a, 1.11% of variable 2 and 95.5% of veriable 3. the first column indicates the year that the values are measured. 例如,行1包含变量a的3.33%,变量2的1.11%和变量3的95.5%。第一列表示测量值的年份。

My goal is to make a prediction for the next 5 years, so from year 200 to 205. 我的目标是对未来5年(从200年到205年)进行预测。

I can do that by making three normal time series forecast. 我可以通过进行三个正常的时间序列预测来做到这一点。 But for that forecast the total sum is never equal to 1, which is very important. 但是对于该预测,总和永远不会等于1,这非常重要。 Normally, I use techniques like arima and exponential smoothing. 通常,我使用诸如Arima和指数平滑的技术。

Does somebody know a method to make a forecast for such a problem? 有人知道预测这种问题的方法吗?

Well, I think that you need to make a statistical Normalization ; 好吧,我认为您需要进行统计归一化 subtracting each estimated score from the estimated mean, then dividing the result by the estimated standard deviation. 从估计的平均值中减去每个估计的分数,然后将结果除以估计的标准偏差。 This would gurantee that your forecast values lie in the range [0-1]. 这样可以保证您的预测值在[0-1]范围内。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM