Computes forecast combination weights using ordinary least squares (OLS) regression.

comb_OLS(x)

Arguments

x

An object of class 'foreccomb'. Contains training set (actual values + matrix of model forecasts) and optionally a test set.

Value

Returns an object of class foreccomb_res with the following components:

Method

Returns the best-fit forecast combination method.

Models

Returns the individual input models that were used for the forecast combinations.

Weights

Returns the combination weights obtained by applying the combination method to the training set.

Intercept

Returns the intercept of the linear regression.

Fitted

Returns the fitted values of the combination method for the training set.

Accuracy_Train

Returns range of summary measures of the forecast accuracy for the training set.

Forecasts_Test

Returns forecasts produced by the combination method for the test set. Only returned if input included a forecast matrix for the test set.

Accuracy_Test

Returns range of summary measures of the forecast accuracy for the test set. Only returned if input included a forecast matrix and a vector of actual values for the test set.

Input_Data

Returns the data forwarded to the method.

Details

The function integrates the ordinary least squares (OLS) forecast combination implementation of the ForecastCombinations package into ForecastComb.

The OLS combination method (Granger and Ramanathan (1984)) uses ordinary least squares to estimate the weights, \(\mathbf{w}^{OLS} = (w_1, \ldots, w_N)'\), as well as an intercept, \(b\), for the combination of the forecasts.

Suppose that there are \(N\) not perfectly collinear predictors \(\mathbf{f}_t = (f_{1t}, \ldots, f_{Nt})'\), then the forecast combination for one data point can be represented as: $$y_t = b + \sum_{i=1}^{N} w_i f_{it}$$

An appealing feature of the method is its bias correction through the intercept -- even if one or more of the individual predictors are biased, the resulting combined forecast is unbiased. A disadvantage of the method is that it places no restriction on the combination weights (i.e., they do not add up to 1 and can be negative), which can make interpretation hard. Another issue, documented in Nowotarski et al. (2014), is the method's unstable behavior when predictors are highly correlated (which is the norm in forecast combination): Minor fluctuations in the sample can cause major shifts of the coefficient vector (‘bouncing betas’) -- often causing poor out-of-sample performance. This issue is addressed by the comb_LAD method that is more robust to outliers.

The results are stored in an object of class 'foreccomb_res', for which separate plot and summary functions are provided.

References

Granger, C., and Ramanathan, R. (1984). Improved Methods Of Combining Forecasts. Journal of Forecasting, 3(2), 197--204.

Nowotarski, J., Raviv, E., Tr\"uck, S., and Weron, R. (2014). An Empirical Comparison of Alternative Schemes for Combining Electricity Spot Price Forecasts. Energy Economics, 46, 395--412.

Examples

obs <- rnorm(100)
preds <- matrix(rnorm(1000, 1), 100, 10)
train_o<-obs[1:80]
train_p<-preds[1:80,]
test_o<-obs[81:100]
test_p<-preds[81:100,]

data<-foreccomb(train_o, train_p, test_o, test_p)
comb_OLS(data)
#> $Method
#> [1] "Ordinary Least Squares Regression"
#> 
#> $Models
#>  [1] "Series 1"  "Series 2"  "Series 3"  "Series 4"  "Series 5"  "Series 6" 
#>  [7] "Series 7"  "Series 8"  "Series 9"  "Series 10"
#> 
#> $Fitted
#> Time Series:
#> Start = 1 
#> End = 80 
#> Frequency = 1 
#>  [1]  0.423016743 -0.416757272 -0.600040581  0.132978812  0.025569531
#>  [6]  0.004797593  0.802174635  0.040591412  0.095483977  0.324425064
#> [11] -0.023755458  0.157934371  0.112706808  0.447781913  0.465482123
#> [16] -0.362224126  0.511887394 -0.500068024  0.163515719 -0.342245036
#> [21] -0.005852930 -0.131010504  0.187045090 -0.420591474  0.466017546
#> [26] -0.436174703  0.082662528  0.457733090  0.021105103  0.169766680
#> [31]  0.485305798  0.193787112  0.533853794  0.920864614  0.082924260
#> [36]  0.371336798 -0.006623156  0.440338047  0.701477887  0.673015421
#> [41]  0.071713369 -0.044020132  0.209853303  0.441483494  0.323725180
#> [46]  0.780987474 -0.458776892  0.583102290  0.096976905  0.520039230
#> [51]  0.051088195  0.283519271  0.126136078  0.177245910 -0.504537996
#> [56] -0.297064432  0.048079458 -0.205270530  0.346393073 -0.312306084
#> [61] -0.276558514 -0.173754408  0.506693217  0.461497566  0.177894593
#> [66]  0.135179393  0.602939811  0.109433203 -0.069951042  0.053260549
#> [71]  0.187901558 -0.411638139 -0.486188275  0.090811754 -0.373300769
#> [76] -0.743713361  0.373254657  0.077956797  0.441385505  0.076049701
#> 
#> $Accuracy_Train
#>                     ME     RMSE       MAE      MPE     MAPE        ACF1
#> Test set -6.193505e-19 1.032368 0.8077056 93.51845 125.5303 -0.01611748
#>          Theil's U
#> Test set  1.313787
#> 
#> $Input_Data
#> $Input_Data$Actual_Train
#> Time Series:
#> Start = 1 
#> End = 80 
#> Frequency = 1 
#>  [1]  0.25470325  0.02032630  0.98295225 -0.26206685  1.89997294 -0.04077880
#>  [7]  0.59520888  0.77101983 -1.50672815  0.74892238 -0.10432356 -1.78216972
#> [13] -0.74798906  0.98021539  1.91700073 -0.55756282  0.49886915 -0.32948466
#> [19] -0.82866713 -0.91148372  0.59719097  0.90584143  0.41280731  0.63113533
#> [25] -0.83624473 -0.66873438 -0.99005285  1.57330702  2.92895756  0.28399229
#> [31]  0.57238248  0.07264993 -1.11045934  1.11059118  0.03106643  0.78798543
#> [37] -0.79402067  0.97828407  0.88219992  1.65414292  0.02837874  0.69606939
#> [43] -0.41551709  0.33778923  0.30690661 -0.78956898 -2.80540895  0.49899051
#> [49] -0.24975629  0.07582576 -1.12256455  1.46915230  0.20452337  1.40435824
#> [55] -2.40381404  0.95672516  1.16187717 -0.49907571  1.09000502 -0.56591032
#> [61]  0.47304995  1.43705882  1.81374203 -0.46431843  2.04643671 -0.71481789
#> [67] -0.35036600  0.88404582 -0.19407351  0.23495565 -1.22640892  0.31514897
#> [73] -1.98437703 -1.10654986 -1.85507815 -0.88119444 -0.37689758  2.03235753
#> [79]  0.58145368 -1.41635434
#> 
#> $Input_Data$Forecasts_Train
#> Time Series:
#> Start = 1 
#> End = 80 
#> Frequency = 1 
#>       Series 1    Series 2    Series 3    Series 4    Series 5     Series 6
#>  1 -0.20040841  1.07638031  0.65575927  1.24192854  1.90662813  1.673023662
#>  2  3.16077911 -1.25667872  0.43604386  1.52038940  0.91384938  1.916447196
#>  3  0.70243584  1.45311576  0.47971136  1.74387567  2.36129944  1.402549521
#>  4  4.03844850 -0.92509223  1.81374941  1.66728781 -0.46367374  1.125941848
#>  5  1.33736282  2.40729338  2.08686118  1.61491363  0.43022851 -0.523021637
#>  6  1.41907991 -0.02310846  2.74136622  1.34912758 -0.49473706  1.003756472
#>  7  0.58455652  2.06872195  3.06235485  2.75319521  1.48991773  0.806722655
#>  8  1.16463450  1.72154323 -0.39617956 -0.07218288  2.93566721  0.851886490
#>  9  1.93225958  1.71356757  0.73646722  0.51132702  1.72771712  1.691738586
#> 10  0.01063740  2.92015032  1.39788379  0.64202524  1.21449015  2.301332000
#> 11  1.53648812 -0.96475333  0.74610151  2.50297325  1.74945862  1.976187190
#> 12  0.37825740  1.71970673  0.78279110 -0.27826424  0.94059431  0.582913122
#> 13  1.11026234  0.36117478  2.31925308  1.83509601  1.17888005  2.035272351
#> 14 -1.09268593  2.33714699  0.59394193  1.34756340  1.65252141  2.083939175
#> 15  0.09324169  0.77319834  2.65075137  2.21479317  1.04273150  1.270444049
#> 16  2.37057631  1.61201598  0.55090267  0.71140615  0.96415058  1.905375734
#> 17  0.87893635  1.34774540  1.57666305  0.34972280  1.47304664 -0.299291561
#> 18  1.40270971  0.62744295 -0.80923237  0.91073420  1.06946323  0.847828716
#> 19 -0.05823961  1.98699098  1.69011132 -0.24533066  0.42952622  3.222775274
#> 20  0.92020091  1.94220124  0.25588439  1.64176953  0.65176044 -1.257263831
#> 21  0.06610437  1.61434886  1.55088513  0.81907278  2.04976052  1.754436168
#> 22 -0.32865112  1.29756668  1.14143460  0.37049063  0.58442920  2.796327679
#> 23  2.47757814  0.34237175  0.30382708  1.00851585  0.90074351 -0.048516694
#> 24  0.28897113  1.99224502  0.51349045  1.48139742  0.41774340  0.494995644
#> 25  0.18560241  0.49261274  1.82864464  0.92920815  0.89753290  2.554265395
#> 26  0.03418280  0.91420315  0.01650212  1.21847578  1.34208749  1.897336890
#> 27 -0.21787873  2.62260314  1.94205778  2.39086434  0.52080770  0.551418644
#> 28  2.37309340 -0.37499385  1.52221011  0.86249807  0.15717532  1.243597768
#> 29  1.01101390  0.57710428  1.30026967  1.67033759  1.09755625  1.948890659
#> 30 -0.13986959  1.97631608  0.66943349  0.61213589 -0.32351956 -0.141329874
#> 31  1.28247779  1.04037462  1.04464643  0.90320074  1.97560685  1.449414336
#> 32  1.02152220  2.14970304  1.29238554 -0.01883212  1.26381757  0.889280823
#> 33  0.35039793  2.78452007  1.47923563 -0.64976624 -0.07546769  0.196502735
#> 34  1.75722274  1.03818276  2.22747680  2.39843365  1.31164126  0.582055614
#> 35  0.24294217  1.08695350 -0.19987001  0.60089026 -0.78896117  1.944991334
#> 36  1.76306573  1.91343427  1.84510395  0.67084436  2.71629313  0.160519641
#> 37  2.11947183  1.26337015  0.95841216  2.36047750 -1.52948348 -0.006880154
#> 38  1.63640340  0.98650762  1.75089587  0.86727824  1.38501735  1.517714682
#> 39  0.60292161  1.74655933  2.82682721  2.03261527  2.04606264  0.368030174
#> 40  2.10043709  1.37161521  1.97631707  0.30651310  3.08965928 -0.375749515
#> 41 -0.01085447  1.14668916  0.80448097  4.20820646  0.98585061  1.699649955
#> 42  0.80128175  0.70718192  0.33130057  0.23843006  0.98068921  3.361845443
#> 43  0.23191856  1.69748433 -0.52871314 -0.03747679  1.69864922  0.958839953
#> 44 -0.82611254  2.32914698  0.76647693  0.66473731  0.87157481  0.813791958
#> 45  2.20645067  1.49866954  0.31729679  0.92039162 -0.28752445  2.677929930
#> 46  1.02802289  2.12108894  2.18187797  0.69216066  1.37473441  0.188748077
#> 47  0.80551112  1.01724390  0.41422558  1.42157073 -0.04256547  0.727888353
#> 48  0.42304984  1.20673961  1.41374713  0.78772861  1.62717072 -0.872784891
#> 49  2.17102058  0.74043814 -0.50732864 -1.29019919  1.66088315  0.679291749
#> 50  1.17308698  0.40112551  1.09572123  0.09217744  0.79885082  1.804291983
#> 51 -0.69354873  1.44844653  0.83791338  1.85824078  1.33385424 -0.408891334
#> 52  0.33404365  1.54888795  0.43867409 -0.24086120  1.03801445  0.368557144
#> 53  0.19932223  0.09617886  2.32541683  1.70675249  0.50835111  2.350585659
#> 54  1.42485516  2.12602991  0.89965631  0.34014556 -0.57454979  0.448675616
#> 55  1.65636967  1.11760535 -0.02469573  2.92434758  0.78276509  1.013827905
#> 56  3.47437621  2.82695317  0.59376237  2.47362398  0.57401983  1.160023909
#> 57  3.11155431  0.56566760  1.65687600 -0.51775279  0.17994934 -1.151658928
#> 58  3.31651573  2.19772833  1.59041972  4.08587706  0.90892565  0.058879201
#> 59  2.28736142  0.76885254  2.66915180  1.17576390  0.10137941  1.845208702
#> 60  0.59927015  0.19050993 -0.07249866  1.12683620 -0.79723604  1.595009767
#> 61  0.89716756  2.09657428  0.59962491  0.59013333  1.04429438  1.567477274
#> 62  0.35321538  0.71408813  1.27361272  1.15900198 -0.80790681 -0.213646753
#> 63  0.23515318 -0.20101677  0.31792772  0.56276775  1.01244865  1.806663669
#> 64  0.67298839  2.19423587  2.08109102 -0.17469471 -0.25471118  1.024264818
#> 65  0.39094449  0.86843174  0.41020541  0.79082112  0.84869885 -0.332879860
#> 66  0.27515216  2.25564278  2.03197598  0.14068833  2.47088459  1.325468037
#> 67  2.47771053  0.86929848  2.85044566 -0.12147295  0.38258063  1.421280819
#> 68  1.62070404  1.30987335  1.08710444  1.84339072  1.98060485 -0.407563004
#> 69  0.27840922  1.03586709  1.24614502  0.32573905  0.08861201  1.948821364
#> 70 -0.61120728  1.69467434  0.05804176  1.50768591  0.25101021 -0.463566033
#> 71  2.14986314  1.22646793  0.88784054  0.58961746  1.63925814  1.395715166
#> 72  1.46757558  0.30584496 -0.07707298  1.14377945  0.73090737 -0.821153934
#> 73  1.08475564 -0.02453042  0.64782248  1.04528357 -0.23573349  1.185239095
#> 74  2.02348947  0.17425113  1.29818530  2.08393049  1.55057651  0.684823976
#> 75  1.97722632 -1.52875078  0.47469785  2.64422786  0.67412376 -0.018402436
#> 76  0.83011896  1.17138094 -0.06608009  1.17794045 -0.12510115 -0.956710753
#> 77 -0.11027409  0.17800213  0.44035475  0.68899366  3.92333129 -0.129695665
#> 78  1.29181735  1.20069159  1.26642584  1.17558267 -0.76005025  3.295425091
#> 79  1.45796483  1.24467521  2.09281374  0.71133776  0.57099282  0.190401879
#> 80  2.57338699  1.23409845  1.73919948  1.58193790  1.10857605  2.875790513
#>       Series 7     Series 8    Series 9    Series 10
#>  1  0.93909229 -0.227265768  0.66759268  0.630664300
#>  2  2.06920733  1.574877052  1.93140852  0.775153527
#>  3  1.84167993  3.213721854  2.69097482  1.732678208
#>  4 -0.36801773 -0.306928591  1.66000943  1.305378964
#>  5  1.23869147  2.113895956 -0.11351057  1.751483142
#>  6  0.12068879  1.888096680  0.33628377  1.732639545
#>  7  2.42173609 -0.212977252  0.36018453  0.950678030
#>  8  2.10731843  1.227533586  0.44247470  1.188603034
#>  9  1.41030596  1.088409999  0.57418437  1.501269234
#> 10  1.81572855  1.213589923  1.62806695  0.453658851
#> 11 -0.94355132  0.049078524  2.56578330  1.233267034
#> 12 -0.22809072  0.899679987  1.03840932  1.511624827
#> 13 -0.34583799  2.614589821  0.92993726  0.330629983
#> 14 -0.60205578 -1.047948041  0.20818964  2.112107334
#> 15 -0.02995960 -0.007261052  0.50744732  2.091560201
#> 16  0.11155509  1.780528225  2.37899466  2.049482570
#> 17  0.69587240 -0.457039523  0.82972665  2.123994544
#> 18  0.30376573 -0.025526881  2.51522613  2.881901855
#> 19  3.17642953  1.653421172  0.34171045  1.193213487
#> 20  0.89472798  1.668445528  1.18911614  1.495895064
#> 21  3.25311827  1.286525492  2.05378488  2.506937372
#> 22  2.33416518  2.006022667  1.97298734  0.868220840
#> 23  1.87455251  0.475241121 -0.69096644  0.063264875
#> 24  1.57641625  2.110059759  2.14025724  1.245632309
#> 25 -0.36253997 -0.435958422 -0.31928934  2.191245917
#> 26  1.81730302  1.766745044  1.12994433  1.789589548
#> 27  1.04773103  1.749084292  0.32833865  1.227581732
#> 28  1.11775135 -0.365680432  1.49105059 -0.151543240
#> 29  0.45228608  1.390483456  0.04356851  1.293464602
#> 30  2.98256873  0.720874223  0.07720277 -0.001017768
#> 31  0.68250938  1.115969847  1.09146209 -0.931880806
#> 32  0.59238105  1.764426236  2.37143918  0.489552834
#> 33 -0.17652386  1.074631207  1.00608123 -0.268982369
#> 34 -1.85402512 -2.134918142  0.56319533  1.671540650
#> 35  1.82696236  0.196966428 -0.15028058 -0.642310961
#> 36  0.17549667  0.787570813  0.87643807  2.765032658
#> 37  0.04968163  0.164211020  0.71303328  0.234114295
#> 38  0.97872035  0.068841478  1.31979654  1.293608292
#> 39  0.85288804 -0.047050166  2.15020496  1.365017037
#> 40  1.27010999  1.483050067 -0.48037030  0.688245962
#> 41  0.95031275  0.400622488  0.67599090 -0.117564755
#> 42  0.68532827 -0.001866286  0.80268115  2.485225725
#> 43  1.19793623 -0.929441057  1.01602809  1.761795357
#> 44  1.25488563 -0.443573313  1.37953402  0.730173269
#> 45  0.12515025  0.025362192 -0.60600842 -0.555042549
#> 46  1.29981563 -0.136335624  2.96292371 -0.052347052
#> 47  2.29845632  1.719064039  2.57542045  0.880216850
#> 48  0.40652195 -0.043892433  1.68511780  0.430001374
#> 49  1.22899547  0.526356925  0.15439518  1.158627389
#> 50  2.25458338 -0.402345616 -0.66077013  0.701134258
#> 51  1.50463334  0.626059709 -0.25290886  1.946440061
#> 52 -0.04216592  0.705311815  0.61706397  0.527888254
#> 53  0.61237873  1.621853960  0.19173068  1.216211228
#> 54  0.89447633 -0.189525480  1.83966232  1.113175815
#> 55  1.40239108  1.694442488 -1.17615361  1.772300657
#> 56  2.11739647  1.753216074  0.85583608  1.033251075
#> 57  2.16766925  1.584102452 -0.39070296  1.926166760
#> 58 -0.07888894  2.367574043 -0.43620132  1.157300140
#> 59  0.70824587  0.921536873  1.43721170  0.911417347
#> 60  1.13433232  0.652049060 -0.33156925  1.099007731
#> 61  1.08249196  2.924804513  1.37997755  0.645937992
#> 62 -0.30226505  0.521106240  2.13230392  2.083365590
#> 63  1.31353900 -1.547605470  0.42007855  0.573607337
#> 64 -0.81737005  1.127589340  0.81110334  0.577092226
#> 65  2.97444780  0.432045495  0.39484374  0.193570832
#> 66 -0.62492004  2.155488971  2.07969126  2.731423622
#> 67  2.67062651  0.341019879  1.38818601  1.028515177
#> 68 -0.02380499  1.655224669 -1.21507869  1.484744622
#> 69  2.39618220  0.913659366 -0.03297668  2.397812168
#> 70 -0.17787227  0.151317505  0.97946091  0.588589024
#> 71  1.78287227  1.038309538  0.96887155  0.706550691
#> 72  0.08363444  0.404870131  3.82155580  1.998704226
#> 73  0.52149542  2.560104096  0.22919390  1.107906554
#> 74  2.78736947  0.481226972  1.47105433  1.128998711
#> 75  1.57988311  1.931962578  0.19685872  0.012441715
#> 76  0.29121954  1.484394987  3.34216731  2.571329874
#> 77  1.66572463  0.101189160  0.53584167  1.771087477
#> 78  0.90454188  1.428079030 -0.23935252 -0.169940047
#> 79  1.06841426  0.768086417  0.27216190  0.893844070
#> 80  1.97946053 -0.055672971  1.40353152  2.990411782
#> 
#> $Input_Data$Actual_Test
#>  [1] -0.08006549 -0.50600894 -1.73843695 -0.12956419 -0.21812288 -0.84018144
#>  [7] -1.92998183 -1.16210604  0.11541613 -1.14671070 -1.98502776 -0.77790688
#> [13] -1.43290009  0.60689363  0.16575501 -0.24697557 -0.64020048 -1.01666243
#> [19]  1.03403406  0.81187543
#> 
#> $Input_Data$Forecasts_Test
#>         Series 1    Series 2    Series 3    Series 4    Series 5    Series 6
#>  [1,]  1.6419174  0.86641135  0.84011486  1.42755607 -0.84793978 -1.14626659
#>  [2,]  0.3738306  1.38324655  0.83722121  0.07405402  0.73945278  0.86985138
#>  [3,]  1.6975170 -0.73535782  0.71351293 -1.52900062  1.84267633 -0.06954723
#>  [4,]  1.9029731  1.48305800  2.58623419  2.09956200  0.62296395 -0.22099168
#>  [5,]  2.2371222  0.43776048  0.59404159  0.90200621  0.95983981  1.91949107
#>  [6,]  1.2141490 -0.08805016  0.26511704  1.42195410  1.58745834  0.45051177
#>  [7,]  0.9112415  0.36670932  1.99899989  1.93186706  2.17691265 -0.03943532
#>  [8,]  0.9262257  0.33021140  0.56255175  0.93562064  1.05803519  1.29697732
#>  [9,]  0.2489347 -0.06213867  1.45123586  0.41728284  1.17759753  0.22275943
#> [10,] -0.9185981  0.47782068  1.58980054  0.92587526  1.04897061  0.07479102
#> [11,]  0.2832975 -0.51402002  0.07803332  1.48714585  1.02480761  1.36961686
#> [12,]  2.5908589  0.49343527  0.85639395 -0.81585595 -0.13799184  0.18182975
#> [13,]  0.8275007  0.62301467 -0.81100685  0.78528888  0.09647047  2.51577061
#> [14,] -0.2198385 -0.09868756  1.35245222  0.86028553  0.11788233  1.94873869
#> [15,]  0.3529274  2.66782994  1.54129838  0.37933861  0.84740469  0.60482405
#> [16,]  0.3156254  1.64205310  2.15743318  0.20948486  2.41331270  0.36242793
#> [17,]  1.0559069 -1.06238884  1.42358473  1.47594913  1.30404029  0.46889077
#> [18,]  2.2299852  2.37871968  1.82419655 -0.43480684  1.17418267  1.65518870
#> [19,]  2.4847295  1.27578468  1.01189698  0.66324681  0.22121957  0.95564075
#> [20,]  1.3820021  0.72692419  0.94523614  0.21093271  1.56207470  0.76921074
#>         Series 7   Series 8   Series 9  Series 10
#>  [1,] -0.2149257  0.2362492  0.3892118 -0.9574365
#>  [2,]  2.0873692  0.3912520  2.2441817  0.9503309
#>  [3,]  2.2795875  0.6004358  2.9097386  0.1339440
#>  [4,]  1.2453706  1.2850713  2.1449950  0.2285957
#>  [5,]  1.5076815  0.1025500  0.8051697  2.5654147
#>  [6,]  0.2467540  1.1266065  0.9630607  1.4660534
#>  [7,]  1.8462417  0.5104419  0.9175371  1.8205856
#>  [8,] -0.4128461  0.6316598  2.7374832  1.0457135
#>  [9,]  1.4594689  1.7750816  1.1155832  0.4665911
#> [10,]  2.5085626  1.5041025  2.0944515  0.6621737
#> [11,]  2.1882638  0.9952038  2.3841197  1.9648886
#> [12,]  0.5213700  0.3377195  1.7874568  1.2050087
#> [13,]  2.1791099 -1.1751978  0.1266573  0.1565797
#> [14,]  2.4881396  3.1116781  0.9864837  1.0542724
#> [15,]  2.4958565  1.3209563 -0.1644405  1.5869617
#> [16,]  1.1016987  0.4371525  1.6231557  2.2040881
#> [17,]  1.5638212  0.3742984 -0.3527784  0.8295184
#> [18,] -1.8017657  0.5182069  1.8234413  3.0776098
#> [19,]  0.9360053  1.1010440 -1.4312860  1.1319318
#> [20,]  0.2823630  2.4247818  3.0113830  1.3535829
#> 
#> 
#> $Predict
#> function (object, newpreds) 
#> {
#>     coef <- c(object$Intercept, object$Weights)
#>     pred <- as.vector(coef %*% t(cbind(1, newpreds)))
#>     return(pred)
#> }
#> <bytecode: 0x56049bd94a80>
#> <environment: namespace:ForecastComb>
#> 
#> $Intercept
#> [1] 0.2144699
#> 
#> $Weights
#>  [1] -0.009176041  0.053834737  0.240633259 -0.089338476  0.117324144
#>  [6] -0.007919222 -0.023697345 -0.204043755 -0.056075431 -0.150969918
#> 
#> $Forecasts_Test
#>  [1]  0.30987115  0.16160836  0.32441864  0.33993392 -0.11182091 -0.19302953
#>  [7]  0.31579408 -0.04108829  0.12739531  0.08717766 -0.50574611  0.11517738
#> [13]  0.12391165 -0.45020103  0.22744230  0.54160229  0.28869059  0.29460813
#> [19]  0.12551086 -0.24795699
#> 
#> $Accuracy_Test
#>                  ME     RMSE       MAE      MPE     MAPE
#> Test set -0.6475088 1.118259 0.9500539 139.1254 143.8849
#> 
#> attr(,"class")
#> [1] "foreccomb_res"