OPTIONS double CRT nwidth=20,signif=10; NAME LONGLEY 'TEST Longley benchmark with double precision data'; load; SMPL 1 16 ; list xs C X1-X6; OLSQ TOTEMP xs; title 'OLSQ with default orthonormalization'; ndigits @coef; options fast; OLSQ TOTEMP xs; title 'OLSQ without orthonormalization'; ndigits @coef; Proc ndigits b; ? print number of correct digits for each Longley coefficient ? (of a possible 10) ? "true" coefficients from Longley (1967), or The American Statistician ? August 1988, p.222 ? The "true" answers are not actually accurate to 10 digits. ? I will update this with the NIST certified answers soon. -- C.C. 8/97 mat ndigcor = -log10( abs((b-b10)/b10) ); mat if10 = round(ndigcor) .eq. 10; mat ndigcor = 10*if10 + ndigcor % (.not.if10); print ndigcor; endproc; END ; noprint; read(nrow=7,ncol=1) b10; ? true values to 10 digits -3482258.633 15.06187227 -.0358191793 -2.020229804 -1.033226867 -.05110410565 1829.151465 ? 1829.1511465 in The American Statistician, a typo? ; SMPL 1 16 ; LOAD TOTEMP ; 60323 61122 60171 61187 63221 63639 64989 63761 66019 67857 68169 66513 68655 69564 69331 70551 ; LOAD X1 ; 83.0 88.5 88.2 89.5 96.2 98.1 99.0 100. 101.2 104.6 108.4 110.8 112.6 114.2 115.7 116.9 ; LOAD X2 ; 234289 259426 258054 284599 328975 346999 365385 363112 397469 419180 442769 444546 482704 502601 518173 554894 ; LOAD X3 ; 2356 2325 3682 3351 2099 1932 1870 3578 2904 2822 2936 4681 3813 3931 4806 4007 ; LOAD X4 ; 1590 1456 1616 1650 3099 3594 3547 3350 3048 2857 2798 2637 2552 2514 2572 2827 ; LOAD X5 ; 107608 108632 109773 110929 112075 113270 115094 116219 117388 118734 120445 121950 123366 125368 127852 130081 ; LOAD X6 ; 1947 1948 1949 1950 1951 1952 1953 1954 1955 1956 1957 1958 1959 1960 1961 1962 ;