简体   繁体   English

时间序列数据的多元分析

[英]Multivariate Analysis on Time-series data

I'm analyzing some data I collected for 3 weeks, in particular I would like to correlate a dependent variable (y) to other 10 indipendent metereological variables (x1 - x10);我正在分析我收集了 3 周的一些数据,特别是我想将因变量 (y) 与其他 10 个独立的气象变量 (x1 - x10) 相关联; I was thinking on multivariate regression but I would like also to consider the stationary data as time series, as all the data were collected every 5 minutes for the entire time range.我正在考虑多元回归,但我也想将平稳数据视为时间序列,因为在整个时间范围内每 5 分钟收集一次所有数据。 Something like this: y(t) ~ a1 * x1 (t) + ... + a10 * x10 (t) + q (t) What kind of models could you kindly suggest, to run in R cran?像这样的东西:y(t) ~ a1 * x1 (t) + ... + a10 * x10 (t) + q (t) 你可以建议什么样的模型,在 R cran 中运行? Alternatively, I would like also to approach to a sort of cluster analysis that considers also time as covariate but a didn't find the right package for R cran.或者,我还想进行一种聚类分析,该分析也将时间视为协变量,但没有找到适合 R cran 的包。 Thank you in advance, Elisa提前谢谢你,伊莉莎

However, your equation y(t) ~ a1 * x1 (t) + ... + a10 * x10 (t) + q (t) isn't really a time series model as all the inputs are at time t.但是,您的方程 y(t) ~ a1 * x1 (t) + ... + a10 * x10 (t) + q (t) 并不是真正的时间序列模型,因为所有输入都在时间 t。 Did you mean something like y(t) ~ a1 * x1 (t) + ... + a10 * x10 (t) + y(t - 1) instead?你的意思是 y(t) ~ a1 * x1 (t) + ... + a10 * x10 (t) + y(t - 1) 吗?

The function stats::arima can fit multivariate time series models using the argument xreg to include the covariates.函数stats::arima可以使用参数xreg来拟合多元时间序列模型以包含协变量。

To do clustering with time as a covariate, simply convert your time column to a numeric column.要将时间作为协变量进行聚类,只需将时间列转换为数字列。 Then there are a large number of methods for clustering including kmeans and hclust(dist(myData)) .然后有大量的聚类方法,包括kmeanshclust(dist(myData)) See here for more details.请参阅此处了解更多详情。

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

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