Computes a ‘combined forecast’ from a pool of individual model forecasts using their median at each point in time.

comb_MED(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 used 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.

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

Suppose \(y_t\) is the variable of interest, there are \(N\) not perfectly collinear predictors, \(\mathbf{f}_t = (f_{1t}, \ldots, f_{Nt})'\). For each point in time, the median method gives a weight of 1 to the median forecast and a weight of 0 to all other forecasts, the combined forecast is obtained by:

$$\hat{y}_t = {median(\mathbf{f}_{t}})$$

The median method is an appealing simple, rank-based combination method that has been proposed by authors such as Armstrong (1989), McNees (1992), Hendry and Clements (2004), Stock and Watson (2004), and Timmermann (2006). It is more robust to outliers than the simple average approach.

References

Armstrong, J. S. (1989). Combining Forecasts: The End of the Beginning or the Beginning of the End?. International Journal of Forecasting, 5(4), 585--588.

Hendry, D. F., and Clements, M. P. (2004). Pooling of Forecasts. The Econometrics Journal, 7(1), 1--31.

McNees, S. K. (1992). The Uses and Abuses of 'Consensus' Forecasts. Journal of Forecasting, 11(8), 703--710.

Stock, J. H., and Watson, M. W. (2004). Combination Forecasts of Output Growth in a Seven-Country Data Set. Journal of Forecasting, 23(6), 405--430.

Timmermann, A. (2006). Forecast Combinations. In: Elliott, G., Granger, C. W. J., and Timmermann, A. (Eds.), Handbook of Economic Forecasting, 1, 135--196.

Author

Christoph E. Weiss and Gernot R. Roetzer

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_MED(data)
#> $Method
#> [1] "Median Approach"
#> 
#> $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] 1.1224367 0.4694342 0.7193104 1.1921962 0.3681826 0.3965511 1.4193594
#>  [8] 0.5057404 1.1923932 0.5570889 1.1320445 0.9532289 0.9123337 0.4790135
#> [15] 1.4783023 0.8581129 0.8483152 1.2051638 0.5243691 0.7510746 1.3609333
#> [22] 1.1026107 1.1154418 1.3086196 0.6366290 0.4704636 0.6654157 1.5054029
#> [29] 1.5001511 1.0081909 0.9499590 0.4399067 0.8913179 1.0669495 1.3139791
#> [36] 0.6926121 0.6073294 1.8363494 0.7569385 0.7355752 1.0407353 1.2470349
#> [43] 0.5706146 0.7223319 0.6832961 1.2825109 1.2266559 0.8867792 1.1448557
#> [50] 1.5423376 0.9384935 0.7395540 0.9001756 0.5903631 1.0487588 0.8817216
#> [57] 1.3472543 1.0543873 1.1304358 0.6700851 0.8834472 0.8822722 1.3422106
#> [64] 1.2080506 1.2350976 0.7573170 0.9151186 1.3154661 0.6572378 0.7450878
#> [71] 1.3913137 1.3879678 0.5359268 0.6751180 0.6199182 0.6717828 1.3886285
#> [78] 1.5983996 0.9488305 0.7978093
#> 
#> $Accuracy_Train
#>                  ME     RMSE      MAE      MPE     MAPE        ACF1 Theil's U
#> Test set -0.8562043 1.386773 1.082739 18458.31 18593.13 -0.02717124  1.445023
#> 
#> $Input_Data
#> $Input_Data$Actual_Train
#> Time Series:
#> Start = 1 
#> End = 80 
#> Frequency = 1 
#>  [1]  0.978865336 -0.547785849  0.911546718  0.148256848  0.247195008
#>  [6]  0.522922492  0.878985495 -0.479821224  0.143917848  0.987904906
#> [11] -0.079027067 -0.260689035  1.063678346  2.131803782  0.742465387
#> [16]  0.325217539  0.728122345 -0.842080598  0.929188508 -1.828715020
#> [21] -0.637638687 -1.704098758  1.364777758  0.598645865 -1.145293106
#> [26]  1.030258511  0.449131272 -1.222793768  1.499402978  0.814054265
#> [31] -0.373474558 -0.046682540  0.258745417  0.121438132  0.923709023
#> [36] -0.444840258 -1.292004530 -0.847929113  0.233228951  0.918301054
#> [41] -0.676281833 -0.969357701 -0.013686180  0.189451685 -1.032769274
#> [46]  0.516217861  1.490597729  0.626786417  3.127359249 -0.539041679
#> [51] -0.685911439 -1.029820721 -1.532288862 -0.051291657 -2.849892596
#> [56] -0.515270245  0.684706956  0.083074219  1.425081586 -1.185278699
#> [61]  1.391586693 -1.807649248  1.073366446 -0.067920294 -0.000084349
#> [66]  0.309689494 -0.682605196 -0.509168652  0.517553975 -0.479464792
#> [71] -0.572731949  1.240261309  1.756205078  0.370791342  0.930758804
#> [76] -2.361428188 -0.663179525  1.418367804  0.704222185  1.328622219
#> 
#> $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.488943813  1.057364667  1.749842159  1.56855514  0.5395707  0.96153209
#>  2  0.105492551  0.368743634  1.214119146 -0.16543958  0.5701248  2.83091630
#>  3  0.009229535 -1.275928702  0.293798576 -0.32026738  0.5433644  2.43172843
#>  4  2.473697519  1.223525276  2.296242897  2.90674129 -0.3319220  1.25894795
#>  5  1.402301747  2.148174980 -0.072785698  0.24253711  2.7540602 -0.60842792
#>  6  0.387831011  0.365405872  0.037443901 -0.04299873 -0.1042174  0.63708856
#>  7  0.250993536  1.344673750  1.994850308  1.09258964  2.4033811  0.15749433
#>  8  0.135588901  0.384845510  1.002572037  1.15605399  2.3959477  0.56057486
#>  9 -0.083702707  1.091567473  1.535275865 -0.34881604  0.7712634  2.22090435
#> 10  1.186083830  0.518482507  0.218623010  0.63100186  2.0975017 -0.53918983
#> 11  0.605001145  0.146590818  1.205481358  1.76511353  1.0771194  1.65268565
#> 12  2.519470386  0.655299230 -0.148757032  1.63434793  1.0711831  0.83527462
#> 13 -0.021690726  0.678359749  1.146307682  1.81295937  1.2029745  1.51345976
#> 14  1.364874743  1.319013543 -0.544290660  0.19233107  0.1242016  0.86660900
#> 15  0.885848475 -0.043398738  1.544360234  1.83838689  1.4122444  0.62760561
#> 16 -1.316451618 -0.040354061  1.843474192  2.44820814  1.5743150  1.25008936
#> 17 -0.034021382  1.332597478 -0.723365201  2.10910972  0.1640883  0.96798461
#> 18  2.367826473 -0.604599920  1.217538733  0.50673006  1.3409816  1.18252038
#> 19 -0.634847962  0.433548147 -0.958622328  0.49796829  1.7211705  1.76261419
#> 20  1.334421833  0.043251557 -0.329022867  1.66776560 -0.7580846  0.85085345
#> 21  1.385168182  0.766498414 -0.433677300  2.60782494 -0.1170326  2.56247994
#> 22  1.449483159  2.352003266  0.399164233  1.09145444 -1.3393102  1.86921666
#> 23 -0.162006858  0.351418847  0.803490468  2.77263285  0.5579091  1.66768724
#> 24  0.700769441 -0.780743790  1.867991885  0.15170551  1.1766739  1.78070742
#> 25  0.295873265  2.454030487 -0.117515815  0.19726375  0.2809215  1.10596091
#> 26  0.556153518  0.274680787  1.261879337 -0.84109159  2.7054692 -0.65888593
#> 27  0.863602441  0.588860177  0.836892042 -0.67395214  0.7321673  0.73230687
#> 28  1.591018485  0.273624031  1.454898604  0.51085346  1.5559072  1.31614024
#> 29  1.394493952  1.700339771  2.107099643  1.60580824  0.4830043  0.87065958
#> 30  1.311938107  2.518594685  0.746324647  1.49289890 -0.1745005  0.85066108
#> 31  1.332435198  0.855994917  0.432900327  0.25728993  2.9056051  2.68450172
#> 32  1.878170595 -0.253382881  0.182965108  0.32214785  1.3254188 -0.60687822
#> 33  0.132417902  2.340664450  0.486461014  0.88226208  0.9003736  1.30269674
#> 34 -1.071511344  0.007631351  1.041101145  2.13306169  0.8470612  2.63125262
#> 35  0.184150268  0.154777403  2.429908846  2.61247438  1.2798536  2.20818060
#> 36  0.696380382  1.365755412  0.144311876  0.68884391  2.0365274  0.22357650
#> 37  0.222934992  0.814902207  2.457107508  0.58230212  1.3015450  1.96638622
#> 38 -0.903546283 -0.775418822  2.426866322  2.27708827  2.2667728  0.24327526
#> 39  0.536733762  1.679475727  0.417306721 -0.27529053  0.9150708  0.10452490
#> 40  1.471510105  0.086472130  0.878958946  0.03133911  0.5921914 -1.14799380
#> 41 -0.221438114 -0.625439523  0.975903461  1.24442456  1.4448581 -0.97378085
#> 42  1.824574309  1.559997110  0.812006942  2.48307673 -0.4278590  0.52281396
#> 43  0.006321593  0.890691693  1.039131523  0.88210246 -0.1869616  1.66362867
#> 44  1.915466336 -0.078772658  0.949776208  1.85451783  1.4505061 -0.22901083
#> 45  1.388058229  0.709848348  0.656743837  0.57693751  1.5505776  0.18224700
#> 46  1.451254063  2.499264348  0.729959474 -0.10455187  1.1137677  1.76734375
#> 47  1.386709204  3.322924707  0.300799484 -0.14050398  2.2208933  2.31147847
#> 48  3.192030953  0.473488775  1.446994022  1.51683339  0.5722271  1.03107871
#> 49  1.141475687  1.818520864  1.500996291  1.51752702  1.7228508  1.14823567
#> 50  1.671552652  1.086802360  3.116563739  1.22023152  1.8330211  2.21443731
#> 51  0.791328753  1.085658198  2.424763809  1.38019967  1.4813050  1.78382188
#> 52  2.028189689  0.146729420 -0.545961161 -0.51760209  0.9812862  1.19550047
#> 53  0.939612337  0.638258968  1.446091349  0.90379222  0.3925913  0.89655891
#> 54  0.593136184  0.459117226  0.866358726  1.70967500  0.4261571 -0.34589486
#> 55  1.895514383  1.555509536  0.266529450  0.21672403  2.2208112  0.94054001
#> 56 -0.018347145  1.690599183 -0.000612352  1.82607637  1.8943404  1.42493228
#> 57  2.328950734 -0.013828619  1.566053711  1.12845494 -0.6531850  0.75647702
#> 58  1.151121207  0.909191228  1.041941693  2.93745338  1.1869320  0.85285048
#> 59 -0.262054866  2.694692054  0.196655219  2.81554487  2.4082310  0.92975988
#> 60  0.527698480  2.176509260  0.812471737  1.76845374  0.2874121  2.36809092
#> 61  0.413009002  0.882041194  2.261549113  0.88485326  0.4964921  1.32737450
#> 62  2.483210555  1.122635878  0.080816818 -0.25240037  2.1079227  0.67800405
#> 63  1.450223138  0.943012680 -0.941726537 -0.16852781  1.3997264  1.39136544
#> 64  0.602422706 -0.137225480  1.260823157  2.26669757  2.3797618  2.17409479
#> 65  1.760441020  1.249382548  1.110555767  1.60830251  1.9507919 -0.23306350
#> 66  1.558714677  1.587287585  0.750740636  0.76389329  0.7316154 -1.36835914
#> 67  1.832072282  0.732855965  0.702000386  1.75845868  1.5543575  0.04497107
#> 68  1.228374691  3.080516955  2.679270067 -0.19123179  2.8980055  0.58650678
#> 69  1.466970828 -0.053679274  2.492174236  0.78977837  1.2006755  0.45136454
#> 70  0.884777854  1.340308723 -0.101277244 -0.36893367  2.2136936  0.60539767
#> 71  0.472824323  1.770064960  1.335474042  1.44715342  2.5969528  1.57907643
#> 72  1.588779515 -0.512629876  3.826726486 -0.28778993  2.1913120  1.17464312
#> 73  0.651367098  2.395108089  0.420486520 -0.06952218 -1.1168885  0.19802273
#> 74  0.693629880  1.608032648 -0.337859250  2.88337576  0.3123823  1.17926482
#> 75  1.852321505 -0.248545417  0.208717485  0.71909190  3.1598516  0.52074445
#> 76  0.033547761  0.221576439  1.646330905  1.83159127  0.9144567 -0.50495594
#> 77 -0.730506919  3.496252138  1.748280249  2.13580174  1.0730470 -0.33912630
#> 78  0.730758347  1.443159000  1.892710018  1.75364028  0.5225041  3.23424347
#> 79  0.674677194  1.933583398  0.138196600  1.32575611 -1.9789052  1.47305000
#> 80 -0.060341201  0.463945508  2.005639939  0.94840312  0.2069052  0.34495540
#>       Series 7    Series 8    Series 9    Series 10
#>  1 -0.96554893  1.18750874  1.51835292  2.105803124
#>  2 -0.23312681  2.60004524  1.66583663  0.236711148
#>  3  0.89525640  1.51654920  2.67418936  1.884960309
#>  4  1.16086703 -0.11789668  0.23750797  0.813272120
#>  5  0.27463471  0.38528315  0.44286386  0.351081972
#>  6  0.40527116  1.55795254  1.25349875  2.245920037
#>  7  1.53730650  1.49404512  2.65245339  1.045860960
#>  8  3.24414443  0.45090602 -0.60433924  0.345368922
#>  9  1.59366037  1.08904010  1.29321898  1.520841773
#> 10 -0.37030201  2.02918097  0.59569531 -0.814035703
#> 11  2.03060101  0.24837891  0.16070278  1.186969742
#> 12  2.28786592  0.20456942  0.65683981  1.495487916
#> 13  1.14810155  0.34327607 -0.11771727  0.525628106
#> 14  0.40891910 -0.61490569  0.54910792  3.281245333
#> 15  1.72013414  1.35599351  2.25247512  2.306049298
#> 16  0.41629021  2.77771012  0.46613647 -0.606880121
#> 17  1.46904325  0.90032338  0.79630692 -0.013763464
#> 18  1.41239829  1.19278883  0.52953377  1.392202008
#> 19  2.30273604  1.11419250  0.55076997 -1.084443424
#> 20  0.83229197  2.84962703  0.66985718 -0.493432019
#> 21  0.74809404  1.33669836  1.55221686  2.734606008
#> 22 -0.47616798 -0.95625038  1.11376704  1.456090828
#> 23  0.88640381  3.15552089  1.34447984  2.512934225
#> 24  2.68255713  1.44056521  2.06485738  0.513466233
#> 25 -0.02356250  2.24471196  1.69995559  0.977384718
#> 26  0.38477360  0.29635203  1.26424292  1.473404292
#> 27  0.48432756 -0.13537978  0.59866408  1.942627027
#> 28  1.99193937  0.81904886  1.58897071  1.638190135
#> 29  2.11279747  0.78394365  1.90307545 -0.078679284
#> 30 -1.52348651  1.90623267  1.16572068 -0.600352611
#> 31 -1.75631326  0.49053659  2.39182437  1.043923134
#> 32  0.67685473  1.34435881  0.55766563 -0.234902738
#> 33  1.05855443  0.75071381  1.37003911  0.516744140
#> 34  1.09279785  2.79441390  1.96558113  0.167063604
#> 35  0.63720445  1.47621263  1.34810457 -1.019226460
#> 36  1.24267445  1.58086247  0.31411074  0.563392718
#> 37 -0.70853417  0.60893466  0.60572408  0.471851512
#> 38  1.21992641  1.72735307  1.94534569  2.342249097
#> 39  2.22489919  1.60227267  2.02960030  0.598806219
#> 40 -0.14265876  1.66005429  1.57672945  1.325831880
#> 41  1.10556705  1.46772951  1.94242421 -0.875090488
#> 42  0.94206441  1.55200547 -1.05896342  1.824067670
#> 43  1.26851150  0.25912680 -0.05188713 -0.227474573
#> 44 -0.24687420  0.49488750  1.97847123 -0.806501056
#> 45  2.53115786 -0.06302052  0.46917938  1.325783593
#> 46  0.91641252  1.59087617  2.46836255 -1.136541290
#> 47  0.05378789  0.98435186  1.06660268  1.882610098
#> 48  0.74247969  0.15922381 -0.19635235  1.792352034
#> 49  0.47418770  0.36352384  0.95557608  0.850952754
#> 50  1.68321299  1.18245853  1.41312248 -0.317655190
#> 51 -1.57717643  0.43726702  0.15301313  0.759467561
#> 52  0.69308663  0.78602142  0.01934223  1.060339621
#> 53  0.37964226  1.38384758  0.35685945  1.063908700
#> 54  1.84257991  1.82116593  0.58759012 -0.500343516
#> 55  0.55578901  1.62073930  1.01902665  1.078491047
#> 56 -0.12258673  0.33851083  3.33121484 -0.009132207
#> 57 -0.33197901  2.06282502  2.82011704  1.673941414
#> 58  1.06683281 -0.14966513  2.15796274  0.812718870
#> 59  1.33111167  2.58277970  0.36641456  0.103680352
#> 60  1.45314713  0.43452650  0.06790830  0.511802714
#> 61 -0.16930657  1.42686717 -0.10449333  1.814914336
#> 62  0.05830919  1.12573960  1.07254464  0.691999699
#> 63  1.29305584  1.68378683  0.90842803  1.657620805
#> 64  2.26286938  1.10787925  1.15527801  0.373216834
#> 65  1.03515308  1.22081265  0.78299625  1.690313657
#> 66  2.13056941  0.21925985  0.41075922  1.788695709
#> 67 -0.47038363  0.30605834  1.09738117  3.311862257
#> 68  1.40255755  0.96423519  1.89399863  0.195154091
#> 69 -1.00571304  0.52469727  1.21058230 -1.398295880
#> 70  2.23505577  0.27595726 -0.13639282  1.598256844
#> 71  0.14622089  0.16557414  1.78216674  0.056528226
#> 72  1.64999342  1.18715599  2.48756137  0.182335510
#> 73  0.87441247  1.52400359  1.37231229 -0.802739342
#> 74 -1.43402872 -1.15834153  0.65660619  3.092061403
#> 75 -0.17665035 -0.33967461  1.44241135  2.059843169
#> 76  0.61864592  0.72491969  2.53383013  0.554850913
#> 77  1.25789109  1.51936582  0.39374251  2.048924399
#> 78  0.63794890  1.06868577  3.33615095  1.907470726
#> 79  1.22298383  0.09697138  1.99779982 -0.385439174
#> 80  0.72915293  1.58603404  1.03315156  0.866465658
#> 
#> $Input_Data$Actual_Test
#>  [1]  0.41632328 -0.09082108 -0.81906854  1.19623827  2.53041699  0.32243412
#>  [7]  0.54725253  0.15626319  0.51217460 -1.02182878 -0.58959410  0.96521197
#> [13]  0.42892792  0.71117011  0.41915986  2.33956866 -0.06994866 -0.50225798
#> [19] -1.48335938 -1.55612648
#> 
#> $Input_Data$Forecasts_Test
#>           Series 1    Series 2   Series 3   Series 4   Series 5    Series 6
#>  [1,]  1.169324942 -0.15389974  1.7222430 -0.4849414  1.6522019 -0.02090861
#>  [2,]  1.530650364 -0.10280461  0.8181465 -0.3459274  0.9907044  1.29917941
#>  [3,]  0.743012159 -1.08348603  0.2761383  0.5130809 -1.2421643  1.86982909
#>  [4,]  1.702018170  0.73655338  1.1535153 -1.3562198  1.0171144  0.18977983
#>  [5,]  1.466895240  1.12842645  1.3134165  1.1622056  1.4826168  0.98179480
#>  [6,]  0.095241818  0.04151823  0.1982374  2.0565653  0.4331542 -0.31708470
#>  [7,]  1.856863898  1.59666893  0.4278946  1.9519599  2.2104079  3.10906177
#>  [8,]  1.727504826  0.37120170  2.8023390  2.5600033  0.5481535  0.42859639
#>  [9,]  0.963114494  1.83404642  2.8420728  1.7137620  1.8806968 -0.08431143
#> [10,]  1.598319364  0.77579006 -0.2633874  0.7925466  2.0842089 -0.04490042
#> [11,] -0.240428452  2.08136144  1.7593701  1.0695510  0.2831040  1.65500035
#> [12,]  0.784813396  1.97020537  2.0177918  0.7787290  1.0434123  1.00090108
#> [13,]  1.206534883  2.86534914  3.2707941  0.1915653  0.7396429  0.49024122
#> [14,]  0.597026783  1.72806894  0.6071655 -0.1553937  0.2560905  1.06795579
#> [15,]  0.892756546  2.83064948  1.6111181  0.8000808  1.1844710  0.49283509
#> [16,]  2.545335886 -0.68975270  1.4426033  0.1420002  0.9757164  1.82286362
#> [17,]  2.540315554  0.84238268 -0.8436593  1.0939808  0.9847099  1.86976214
#> [18,] -0.003136429 -0.23472905  1.6357010  2.0412464  0.7624664  0.86374186
#> [19,]  0.402919637  1.09661042 -1.0641870  1.5458519  1.0608939 -0.74652455
#> [20,]  1.270569858  0.82443100  1.4996866  1.9196508  2.6931261  0.94245121
#>            Series 7   Series 8    Series 9  Series 10
#>  [1,]  1.5166908967  0.6747596  3.11623708  0.1044019
#>  [2,] -0.2662335035  3.1296183  0.76522831  0.2364295
#>  [3,]  1.7644480212  0.2251646  0.01797547  0.4900349
#>  [4,]  1.2707229924  0.5900415  1.96160610  0.6293880
#>  [5,]  1.1748307571 -0.8578703  0.86172821  0.6947101
#>  [6,]  0.6133640729  2.1716862  0.78212996  0.3880514
#>  [7,]  0.0789197866  1.2316262  0.20090591  2.4511172
#>  [8,]  1.5245408869 -0.4921371  1.32723420  2.0403515
#>  [9,]  0.3633762798  2.1290706  2.21424235  0.8828216
#> [10,] -0.4064171485  2.7406469 -0.28706207  0.3293221
#> [11,] -0.4019916704  0.8687252  3.67889899  2.5969975
#> [12,]  1.1021284237  0.6976618  0.33532758 -0.1174144
#> [13,]  1.0870207459 -0.1620834  3.19321912  2.8437875
#> [14,]  0.0006814147  0.2225539  1.85627241 -0.3020718
#> [15,]  1.5501878299  0.2325108  1.71658158  0.6564874
#> [16,]  2.2527421995  1.9826548  0.61644539  1.0761995
#> [17,]  1.3212843633  0.4882182  0.29354988  1.9966100
#> [18,]  1.1697511711  3.8943971  1.36071035  0.1238004
#> [19,]  1.0539956395  2.1172661  2.15487780  0.2590180
#> [20,]  0.2351021483  0.1205664  0.94639557 -0.4344653
#> 
#> 
#> $Predict
#> function (object, newpreds) 
#> {
#>     pred <- apply(newpreds, 1, median)
#>     return(pred)
#> }
#> <bytecode: 0x56049bcbb0f8>
#> <environment: namespace:ForecastComb>
#> 
#> $Weights
#> [1] "Weights of the individual forecasts differ over time with median method"
#> 
#> $Forecasts_Test
#>  [1] 0.9220423 0.7916874 0.3830866 0.8768339 1.1453160 0.4106028 1.7267664
#>  [8] 1.4258875 1.7739042 0.5525561 1.3622757 0.8928572 1.1467778 0.4265586
#> [15] 1.0386138 1.2594014 1.0393454 1.0167465 1.0574448 0.9444234
#> 
#> $Accuracy_Test
#>                  ME     RMSE      MAE      MPE    MAPE
#> Test set -0.7890496 1.299809 1.103213 113.0336 286.867
#> 
#> attr(,"class")
#> [1] "foreccomb_res"