多变量时间序列模型

时间:2017-06-05 20:03:49

标签: r time-series

我试图根据3个变量预测税基(时间序列):减税,收入流入和经济利润。 我尝试将auto.arimaxreg一起使用,但我收到错误:

  

找不到合适的ARIMA模型。

从2011年到2013年,减税数据基本上都是零,2014年是50,000,2015年是75,000,接下来的几年是10万。 此外,减税就像每家公司获得100,000美元的第一笔100,000美元利润一样免税。我真的想知道我的模型是正确的,否则我应该如何建模这些数据?代码如下:

tb = ts(data1$Taxbreak, start = c(2001), frequency = 1)
inflows = ts(data1$`Inflow of earnings`, start = c(2001), frequency = 1)
ep = ts(data1$`Economic Profits`, start = c(2001), frequency = 1)

xreg = cbind(tb, inflows,ep)
colnames(xreg) <- c("taxbreak","inflows", "economic profit")
xreg

B =ts(data1$`GR Tax Base`, start = c(2001), frequency = 1)
Box.test(B, lag = 15, type = "Ljung-Box")#stationary
acf(B)

revfit<-auto.arima(B, xreg=xreg)
tsdisplay(residuals(revfit))


newtb = ts(forecasted1$Taxbreak, start = c(2017), frequency = 1)
newinflows = ts(forecasted1$`Inflow of earnings`, start = c(2017), frequency = 1)
newperep = ts(forecasted1$`Economic Profits`, start = c(2017), frequency = 1)
nnewxreg = cbind(newtb, newinflows, newep)
nnewxreg

fcast <- forecast(revfit, xreg = nnewxreg)
list(fcast)
plot(fcast)
tsdisplay(residuals(fcast))
accuracy(fcast)

这是我用来访问

的数据
revfit<-auto.arima(B, xreg=xreg)
tsdisplay(residuals(revfit)) 

我在这一步得到了错误。

Year    Taxbreak earnings   Profits    Tax Base
2001    $0.00   $5,332,463  762        32,222,803,774
2002    $0.00   $5,431,753  808       33,610,875,248
2003    $0.00   $5,643,742  979     30,835,183,333
2004    $0.00   $6,134,432  1,179   36,383,352,174
2005    $0.00   $6,433,098  1,375   48,219,466,667
2006    $0.00   $6,871,455  1,578   59,596,984,211
2007    $0.00   $7,265,704  1,609   60,346,996,997
2008    $0.00   $7,390,580  1,435   61,060,551,948
2009    $0.00   $7,171,789  1,237   64,854,063,604
2010    $0.00   $7,258,068  1,588   60,502,826,855
2011    $0.00   $7,581,240  1,782   61,554,035,336
2012    $0.00   $7,862,034  1,952   68,020,593,640
2013    $0.00   $7,903,139  2,006   75,653,752,650
2014    $1.00   $8,211,705  2,026   77,369,017,668
2015    $1.00   $8,625,298  2,098   73,887,957,597
2016    $1.00   9095703 2288.857    76,386,659,364

对于其余的代码,我计划使用以下数据作为我的newxreg来预测2017年至2020年的税基

Year  Taxbreak  earnings    Profits    
2017    $1.00   9330906     2,384
2018    $1.00   9566108     2,497
2019    $1.00   9801311     2,575
2020    $1.00   10036513    2,670
2021    $1.00   10271716    2,766
2022    $1.00   10506918    2,861

0 个答案:

没有答案