简体   繁体   English

R中具有时间序列模型(ARIMA-ARCH)的分位数回归

[英]Quantile Regression with Time-Series Models (ARIMA-ARCH) in R

I am working on quantile forecasting with time-series data. 我正在使用时间序列数据进行分位数预测。 The model I am using is ARIMA(1,1,2)-ARCH(2) and I am trying to get quantile regression estimates of my data. 我正在使用的模型是ARIMA(1,1,2)-ARCH(2),我正在尝试获取数据的分位数回归估计。

So far, I have found "quantreg" package to perform quantile regression, but I have no idea how to put ARIMA-ARCH models as the model formula in function rq. 到目前为止,我已经找到了“ quantreg”软件包来执行分位数回归,但是我不知道如何将ARIMA-ARCH模型作为函数rq中的模型公式。 rq function seems to work for regressions with dependent and independent variables but not for time-series. rq函数似乎适用于具有因变量和自变量的回归,但不适用于时间序列。

Is there some other package that I can put time-series models and do quantile regression in R? 还有其他一些程序包可以放置时间序列模型并在R中进行分位数回归吗? Any advice is welcome. 欢迎任何建议。 Thanks. 谢谢。

Hello and welcome to StackOverflow. 您好,欢迎来到StackOverflow。 Please take some time to read the help page, especially the sections named "What topics can I ask about here?" 请花一些时间阅读帮助页面,尤其是“我在这里可以询问哪些主题?”部分。 and "What types of questions should I avoid asking?" “我应该避免问哪些类型的问题?” . And more importantly, please read the Stack Overflow question checklist . 而且更重要的是,请阅读Stack Overflow问题清单 You might also want to learn about Minimal, Complete, and Verifiable Examples . 您可能还想了解最小,完整和可验证的示例

I can try to address your question, although this is hard since you don't provide any code/data. 尽管您不提供任何代码/数据,这很难,但我可以尝试解决您的问题。 Also, I guess by "put ARIMA-ARCH models" you actually mean that you want to make an integrated series stationary using an ARIMA(1,1,2) plus an ARCH(2) filters. 另外,我想通过“放入ARIMA-ARCH模型”,您实际上意味着要使用ARIMA(1,1,2) ARCH(2)过滤器使固定序列平稳。

For an overview of the R time-series capabilities you can refer to the CRAN task list . 有关R时序功能的概述,请参考CRAN任务列表 You can easily apply these filters in R with an appropriate function. 您可以使用适当的功能在R中轻松应用这些过滤器。 For instance, you could use the Arima() function from the forecast package, then compute the residuals with residuals() from the stats package. 例如,您可以使用预报数据包中的Arima()函数,然后从stats包中使用residuals()计算残差。 Next, you can use this filtered series as input for the garch() function from the tseries package. 接下来,您可以将此过滤后的系列用作tseries软件包中tseries garch()函数的tseries Other possibilities are of course possible. 其他可能性当然是可能的。 Finally, you can apply quantile regression on this filtered series. 最后,您可以在此过滤后的序列上应用分位数回归。 For instance, you can check out the dynrq() function from the quantreg package, which allows time-series objects in the data argument. 例如,您可以从quantreg包中dynrq()函数,该函数允许在data参数中使用时间序列对象。

I just put an answer on the Data Science forum . 我只是在Data Science论坛上回答了。

It basically says that most of the ready made packages are using so called exact test based on assumption on the distribution (independent identical normal-Gauss distribution, or wider). 基本上可以说,大多数现成的包装都使用所谓的精确测试,即基于对分布的假设(独立的相同正态或高斯分布,或更宽泛的分布)。

You also have a family of resampling methods in which you simulate a sample with a similar distribution of your observed sample, perform your ARIMA(1,1,2)-ARCH(2) and repeat the process a great number of times. 您还拥有一系列重采样方法,在这些方法中,您可以模拟观察到的样本具有相似分布的样本,执行ARIMA(1,1,2)-ARCH(2)并重复多次该过程。 Then you analyze this great number of forecast and measure (as opposed to compute) your confidence intervals. 然后,您分析大量的预测并测量(而不是计算)您的置信区间。

The resampling methods differs in the way to generate the simulated samples. 重采样方法在生成模拟样本的方式上有所不同。 The most used are: 最常用的是:

  • The Jackknife : in which you "forget" one point, that is you simulate a n samples of size n-1 (if n is the size of the observed sample). 折刀 :您“忘了”一点,即模拟n个大小为n-1的样本(如果n是观察到的样本的大小)。
  • The Bootstrap : in which you simulate a sample by taking n values of the original sample with replacements: some will be taken once, some twice or more, some never,... Bootstrap :您可以在其中通过替换原始样本的n个值来模拟样本:一些样本将被采样一次,某些样本将被采样两次或更多次,而某些样本则永远不会...

It is a (not easy) theorem that the expectation of the confidence intervals, as most of the usual statistical estimators, are the same on the simulated sample than on the original sample. 这是一个(不容易的)定理,与大多数常用的统计估计量一样,置信区间的期望在模拟样本上与在原始样本上相同。 With the difference that you can measure them with a great number of simulations. 区别在于您可以通过大量仿真来测量它们。

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

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