ECTSVR

Introduction

****
The cointegration based support vector regression model is a combination of error correction model and support vector regression (http://krishi.icar.gov.in/jspui/handle/123456789/72361). This hybrid model allows the researcher to make use of the information extracted by the cointegrating vector as an input in the support vector regression model.

****

# Examples: How The cointegration based support vector regression model can be applied  
library(ECTSVR)
#> Loading required package: urca
#> Loading required package: vars
#> Loading required package: MASS
#> Loading required package: strucchange
#> Loading required package: zoo
#> 
#> Attaching package: 'zoo'
#> The following objects are masked from 'package:base':
#> 
#>     as.Date, as.Date.numeric
#> Loading required package: sandwich
#> Loading required package: lmtest
#> Loading required package: WeightSVM
#taking data finland from the r library
data(finland)
#takaing the two cointegrated variables (4th and 3rd) from the data set
data_example <- finland[,4:3]
#application of ECTSVR model with radial basis kernel function of Epsilon support vector regression model

ECTSVR(data_example,"trace",0.8,2, "radial","eps-regression")
#>                ect1
#> difp.l1   1.0000000
#> lnmr.l1   0.6242169
#> constant -0.1053779
#>           1           2           3           4           5           6 
#> 0.007442106 0.007442106 0.007442106 0.013148864 0.013156226 0.013160313 
#>           7           8           9          10          11          12 
#> 0.007442106 0.013161295 0.007442106 0.007442106 0.007442106 0.007442106 
#>          13          14          15          16          17          18 
#> 0.013385461 0.007442106 0.012999794 0.007442106 0.013125496 0.013111320 
#>          19          20          21          22          23          24 
#> 0.013095157 0.013077146 0.013057422 0.026210381 0.012104142 0.012851940 
#>          25          26          27          28          29          30 
#> 0.007442106 0.012821802 0.012113769 0.007442106 0.012727457 0.012694920 
#>          31          32          33          34          35          36 
#> 0.012661944 0.012217532 0.012560905 0.012526685 0.012492270 0.012457693 
#>          37          38          39          40          41          42 
#> 0.014710853 0.025072055 0.012635627 0.007442106 0.012110174 0.007442106 
#>          43          44          45          46          47          48 
#> 0.012075790 0.007442106 0.007442106 0.012756543 0.007442106 0.011973554 
#>          49          50          51          52          53          54 
#> 0.011939825 0.012544914 0.012363622 0.012237262 0.011614601 0.011583429 
#>          55          56          57          58          59          60 
#> 0.016360967 0.013115034 0.013131312 0.014651619 0.021765443 0.030734678 
#>          61          62          63          64          65          66 
#> 0.012701692 0.031695378 0.022883156 0.028139471 0.012939760 0.027177371 
#>          67          68          69          70          71          72 
#> 0.022161979 0.031777042 0.013965855 0.032554597 0.013137541 0.026367146 
#>          73          74          75          76          77          78 
#> 0.012212128 0.028550475 0.021425224 0.012906297 0.012811597 0.013146492 
#>          79          80          81          82          83          84 
#> 0.012697656 0.013160313 0.011121547 0.013497269 0.012306289 0.012953645 
#>         85         86         87         88         89         90         91 
#> 0.01242638 0.02097188 0.03065588 0.01289139 0.01261942 0.01593844 0.01786930 
#>         92         93         94         95         96         97         98 
#> 0.01262654 0.01311432 0.01850902 0.01229004 0.01124902 0.01215068 0.01244322 
#>         99        100        101        102        103        104 
#> 0.02438293 0.01308238 0.01335810 0.00954113 0.01251213 0.01315131
#> [[1]]
#>      RMSE_In_ECTSVR RMSE_out_ECTSVR MAD_In_ECTSVR MAD_out_ECTSVR MAPE_In_ECTSVR
#> [1,]     0.01304091      0.01417935   0.009891155     0.01153426            Inf
#>      MAPE_out_ECTSVR
#> [1,]       0.5173228
#> 
#> [[2]]
#>         85         86         87         88         89         90         91 
#> 0.01242638 0.02097188 0.03065588 0.01289139 0.01261942 0.01593844 0.01786930 
#>         92         93         94         95         96         97         98 
#> 0.01262654 0.01311432 0.01850902 0.01229004 0.01124902 0.01215068 0.01244322 
#>         99        100        101        102        103        104 
#> 0.02438293 0.01308238 0.01335810 0.00954113 0.01251213 0.01315131