Trailing-Edge
-
PDP-10 Archives
-
decuslib10-01
-
43,50110/fcst4.tuk
There are 2 other files named fcst4.tuk in the archive. Click here to see a list.
100 REM THIS PROGRAM COMPUTES HENRI THEIL'S MEASURES OF QUALITY
110 REM OF FORECAST. THEY ARE TAKEN FROM HIS TEXT: APPLIED ECONOMIC
120 REM FORECASTING. CHICAGO:RAND-MCNALLY COMPANY, 1966. CHAPTER 2
125 REM ENTER THE DATA AS FOLLOWS STARTING IN LINE 570:
130 REM THE NUMBER OF PERIODS (N)
140 REM THE PREDICTED AND THE ACTUAL IN PAIRS (Z,Y)
150 LET C=0
160 LET D=0
170 LET M=0
180 LET S=0
190 LET A=0
200 LET G=0
210 LET H=0
220 READ N
230 FOR I=1TO N
240 READ Z,Y
250 LET X=(Z-Y)^2
260 LET S = S+ X
270 LET A = A +Y^2
280 LET C=C+Z
290 LET D=D+Y
300 NEXT I
310 LET M=S/N
320 LET R= SQR(M)
330 LET U=S/A
340 LET C=C/N
350 LET D=D/N
360 LET L=(C-D)^2/M
370 RESTORE
380 READ N
390 FOR I= 1 TO N
400 READ Z,Y
410 LET G=G+(Z-C)^2
420 LET H=H+(Y-D)^2
430 LETJ=(Z-C)*(Y-D)
440 LET P=P+(Z-C)*(Y-D)
450 NEXT I
460 LET G=SQR(G/N)
470 LETH=SQR(H/N)
480 LET O=(G-H)^2/M
490 LET P=(P/N)/(G*H)
500 LET Q= 2*(1-P)*G*H/M
510 PRINT"MEAN SQUARE PREDICTION ERROR="M
520 PRINT"ROOT MEAN SQUARE="R
530 PRINT"INEQUALITY COEFFICIEENT="SQR(U)
540 PRINT"BIAS PROPORTION="L
550 PRINT"VARIANCE PROPORTION="O
560 PRINT"COVARIANCE PROPORTION="Q
570 DATA 10
580 DATA 5,10
590 DATA -2,2
600 DATA -4,-7
610 DATA 0,4
620 DATA 1,-3
630 DATA 4,6
640 DATA 7,4
650 DATA -2,-4
660 DATA -2,-1
670 DATA 2,3
9999END