ANNEX B
(to Recommendation E.506)
Example using weighted least squares method
B.1	Telex data
	The telex traffic between the following countries has been analyzed:
–	Germany (D)
–	Denmark (DNK)
–	USA (USA)
–	Finland (FIN)
–	Norway (NOR)
–	Sweden (S)
	The data consists of yearly observations from 1973 to 1984 [19].
B.2	Forecasting
	Before using the weighted least squares method, separate forecasts for the traffic matrix have to be made. In this example a simple ARIMA (0,2,1) model with logarithmic transformed observations without explanatory variables is used for forecasting. It may be possible to develop better forecasting models for the telex traffic between the various countries. However the main point in this example only is to illustrate the use of the weighted least squares technique.
	Forecasts for 1984 based on observations from 1973 to 1983 are given in Table B–1/E.506.
TABLE B–1/E.506
Forecasts for telex traffic between Germany(D), Denmark(DNK),
USA(USA), Finland(FIN), Norway(NOR) and Sweden(S) in 1984
From	
D	
DNK	
USA	
FIN	
NOR	
S	
Sum	
Forecasted	
To								sum	
D	–	4869	12 630	2879	2397	 5230	28 005	27 788	
DNK	 5196	–	 1655	 751	1270	 1959	10 831	10 805	
USA	11 103	1313	–	 719	1657	 2401	17 193	17 009	
FIN	 2655	 715	  741	–	 489	 1896	 6496	 6458	
NOR	 2415	1255	 1821	 541	–	 1548	 7580	 7597	
S	 4828	1821	 2283	1798	1333	 –	12 063	12 053	
Sum	26 197	9973	19 130	6688	7146	13 034			
Forecasted sum	26 097	9967	19 353	6659	7110	12 914			
	It should be noticed that there is no consistency between row and column sum forecasts and forecasts of the elements in the traffic matrix. For instance, the sum of forecasted outgoing telex traffic from Germany is 28 005, while the forecasted row sum is 27 788.
	To adjust the forecasts to get consistency and to utilize both row/column forecasts and forecasts of the traffic elements the weighted least squares method is used.
B.3	Adjustment of the traffic matrix forecasts
	To be able to use the weighted least squares method, the weights and the separate forecasts are needed as input. The separate forecasts are found in Table B–2/E.506, while the weights are based on the mean squared one step ahead forecasting errors.
	Let yt be the traffic at time t. The ARIMA (0,2,1) model with logarithmic transformed data is given by:
			zt = (1 – B)2 ln yt = (1 – qB) at
or
			zt = at – qat–1
where
	zt = ln yt – 2 ln yt–1 + ln yt–2
	at	is white noise,
	q	is a parameter,
	B	is the backwards shift operator.
	The mean squared one step ahead forecasting error of zt is:
			MSQ =  S (zt – z¢t–1(1))2
where
	t–1(1) is the one step ahead forecast.
	The results of using the weighted least squares method is found in Table B–3/E.506 and show that the factors in Table B–1/E.506 have been adjusted. In this example only minor changes have been performed because of the high conformity in the forecasts of row/column sums and traffic elements.
TABLE B–2/E.506
Inverse weights as mean as squared one step ahead forecasting errors 
of telex traffic (100–4) between Germany(D), Denmark(DNK), 
USA(USA), Finland(FIN), Norway(NOR) and Sweden(S) in 1984
From	
D	
DNK	
USA	
FIN	
NOR	
S	
Sum	
To								
 D	 –	 28.72	  13.18	 11.40	  8.29	 44.61	  7.77	
 DNK	  5.91	 –	  43.14	 18.28	 39.99	 18.40	 10.61	
 USA	 23.76	 39.19	 –	 42.07	 50.72	 51.55	 21.27	
 FIN	 23.05	 12.15	  99.08	 –	 34.41	 19.96	 17.46	
 NOR	 21.47	 40.16	 132.57	 24.64	 –	 17.15	 20.56	
 S	  6.38	 12.95	  28.60	 28.08	  8.76	 –	  6.48	
 Sum	  6.15	  3.85	  14.27	  9.55	 12.94	  8.53		

TABLE B–3/E.506
Adjusted telex forecasts using the weighted least squares method
From	
D	
DNK	
USA	
FIN	
NOR	
S	
Sum	
To								
 D	 –	 4850	 12 684	 2858	 2383	  5090	 27 865	
 DNK	  5185	 –	  1674	  750	 1257	  1959	 10 825	
 USA	 11 001	 1321	 –	  717	 1644	  2407	 17 090	
 FIN	  2633	  715	   745	 –	  487	  1891	  6471	
 NOR	  2402	 1258	  1870	  540	 –	  1547	  7617	
 S	  4823	 1817	  2307	 1788	 1331	 –	 12 066	
 Sum	 26 044	 9961	 19 280	 6653	 7102	 12 894