TSP Version 4.4 (06/16/97) Sun/Sol 2.5 4MB Copyright (C) 1997 TSP International ALL RIGHTS RESERVED 08/11/97 7:23 PM In case of questions or problems, see your local TSP consultant or send a description of the problem and the associated TSP output to: TSP International P.O. Box 61015, Station A Palo Alto, CA 94306 USA PROGRAM LINE ****************************************************************** 1 options double nwidth=20 signif=8 crt; ? double is used to store 2 ? data in double precision (series BIG and LITTLE have 8 significant 2 ? digits; single precision can only represent 6-7 digits). 2 ? Also, the polynomial terms X8 and X9 have a large number of 2 ? significant digits (X9 has 9 significant digits). 2 ? Nwidth and Signif are used to print more than the usual digits 2 name nasty "Wilkinson's Statistics Quiz, Sections II-IV"; 2 load; 3 3 ?*** II *** 3 title 'round - II.A'; 4 write(format='(F3.0)') round; ? rounds to even numbers on Sun, rounds up 5 ? on PC and VAX 5 title 'round - II.A.2'; 6 set y1 = int(2.6*7 - 0.2); set y1t=18; 8 set y2 = 2-int(exp(log(sqrt(2)*sqrt(2)))); set y2t=0; 10 set y3 = int(3-exp(log(sqrt(2)*sqrt(2)))); set y3t=1; ? yields 0 on Sun 12 print y1-y3; 13 print y1t-y3t; 14 14 ? II.B 14 graph huge tiny; ? the axis labels for HUGE are ******** (i.e. off scale) 15 graph big little; 16 graph x zero; 17 17 list all x zero miss big little huge tiny round; 18 ? II.C 18 msd x zero big little huge tiny round; ? drop out MISS by hand; otherwise 19 ? the default will drop all observations. 19 ? This crashes (overflow) on the VAX, when trying to compute 19 ? the Kurtosis of HUGE, although this was not requested for II.C 19 ?msd(byvar) all; ? Alternative - override the default to compute stats 19 ? on each variable separately. 19 19 ? II.D 19 corr x zero big little huge tiny round; ? same comments as above 20 ? Note: computes Corr(ZERO,*) = 0, rather than missing. 20 ? (perhaps this should be fixed...) 20 ?corr(pairwise) all; ? Alternative 20 20 ? II.E -- tabulate X against X with weight BIG, and HUGE against TINY 20 ? (no crosstab feature in TSP) 20 20 olsq big c x; ? II.F 21 21 ?*** III *** 21 ? III.A 21 test = 1*(miss=3) + 2*(miss .ne. 3); ? this is the standard way of 22 ? doing such recoding in TSP. TEST is always missing 22 print test; ? (which Wilkinson and Sawitzki note is consistent) 23 23 ? III.B 23 select miss(miss); 24 miss = miss + 1; 25 print miss; 26 26 ? III.C -- tabulate MISS against ZERO 26 ? (no crosstab feature in TSP) 26 26 ?*** IV *** 26 dot(value=i) 2-9; 27 x. = x**i; 28 enddot; 29 olsq x c x2-x9; ? IV.A Results agree with Sawitzki, but he doesn't 30 ? state how he computed them. They differ from SYSTAT. 30 olsq x c x; ? IV.B 31 olsq x c big little; ? IV.C 32 olsq zero c x; ? IV.D 33 33 ? Check number of significant digits in X9 (this is why the default 33 ? single precision data storage does not yield quite the same results 33 ? as IV.A on double precision data). 33 options nodouble; 34 x9s = x9; 35 res9 = x9 - x9s; 36 msd(terse) x9 x9s res9; ? X9 has 9 significant digits 37 37 end; EXECUTION ******************************************************************************* 2 2 noprint; Current sample: 1 to 9 *** WARNING in line 2 Procedure READ: Variable name conflicts with TSP function name; lags and subscripts will not work properly ====> MISS *** WARNING in line 2 Procedure READ: Variable name conflicts with TSP function name; lags and subscripts will not work properly ====> ROUND round - II.A ============ 0. 2. 2. 4. 4. 6. 6. 8. 8. round - II.A.2 ============== Y1 Y2 Y3 Value 18.00000000 0.00000000 0.00000000 Y1T Y2T Y3T Value 18.00000000 0.00000000 1.00000000 PLOT OF HUGE VERSUS TINY ============================ HUGE |---------------------------------------------------| ********** -| *| | * | | | ********** -| * | | * | | | ********** -| * | | * | | | ********** -| * | | * | | | ********** -|* | |---------------------------------------------------| TINY | | | | | | 0.000 0.000 0.000 0.000 0.000 0.000 PLOT OF BIG VERSUS LITTLE ============================== BIG |---------------------------------------------------| 100000000 -| *| | * | | | 100000000 -| * | | * | | | 100000000 -| * | | * | | | 100000000 -| * | | * | | | 100000000 -|* | |---------------------------------------------------| LITTLE | | | | | | 1 1 1 1 1 1 PLOT OF X VERSUS ZERO ============================ X |---------------------------------------------------| 9 -|* | |* | | | 7 -|* | |* | | | 5.000 -|* | |* | | | 3.000 -|* | |* | | | 1.000 -|* | |---------------------------------------------------| ZERO | | | | | | 0 0 0 0 0 0 Univariate statistics ===================== Number of Observations: 9 Mean Std Dev Minimum X 5.00000000 2.73861279 1.00000000 ZERO 0.00000000 0.00000000 0.00000000 BIG 99999995.00000003 2.73861279 99999991.00000003 LITTLE 0.99999995 0.000000027386128 0.99999991 HUGE 5.00000000D+12 2.73861279D+12 1.00000000D+12 TINY 5.00000000D-12 2.73861279D-12 1.00000000D-12 ROUND 4.50000000 2.73861279 0.50000000 Maximum Sum Variance X 9.00000000 45.00000000 7.50000000 ZERO 0.00000000 0.00000000 0.00000000 BIG 99999999.00000004 899999955.00000036 7.50000000 LITTLE 0.99999999 8.99999955 7.49999999D-16 HUGE 9.00000000D+12 4.50000000D+13 7.50000000D+24 TINY 9.00000000D-12 4.50000000D-11 7.50000000D-24 ROUND 8.50000000 40.50000000 7.50000000 Skewness Kurtosis X 0.00000000 -1.20000000 ZERO . . BIG 0.00000000 -1.20000000 LITTLE 2.60611790D-09 -1.20000000 HUGE -7.39013328D-17 -1.20000000 TINY 1.67306688D-16 -1.20000000 ROUND 0.00000000 -1.20000000 Results of Covariance procedure =============================== Number of Observations: 9 Correlation Matrix X ZERO BIG X 1.00000000 ZERO . . BIG 1.00000000 . 1.00000000 LITTLE 1.00000000 . 1.00000000 HUGE 1.00000000 . 1.00000000 TINY 1.00000000 . 1.00000000 ROUND 1.00000000 . 1.00000000 LITTLE HUGE TINY LITTLE 1.00000000 HUGE 1.0000000 1.00000000 TINY 1.00000000 1.00000000 1.00000000 ROUND 1.00000000 1.00000000 1.00000000 ROUND ROUND 1.00000000 Equation 1 ============ Method of estimation = Ordinary Least Squares Dependent variable: BIG Current sample: 1 to 9 Number of observations: 9 Mean of dep. var. = 99999995.0 Std. dev. of dep. var. = 2.73861279 Sum of squared residuals = 0. Variance of residuals = 0. Std. error of regression = 0. R-squared = 1.000000000 Adjusted R-squared = 1.000000000 LM het. test = 0. [1.00] Durbin-Watson = 0. F (zero slopes) = .850705917E+38 [.000] Schwarz B.I.C. = -.850705917E+38 Log likelihood = .850705917E+38 Estimated Standard Variable Coefficient Error t-statistic P-value C 99999990.0 0. .850705917E+38 [.000] X .999999999 0. .850705917E+38 [.000] *** WARNING in line 21 Procedure GENR: Missing values for series ====> MISS: 9 *** WARNING in line 21 Procedure GENR: Some elements of a series set to missing values due to missing values. Number ====> 9 *** WARNING in line 22 Procedure WRITE: Missing values for series ====> TEST: 9 TEST 1 . 2 . 3 . 4 . 5 . 6 . 7 . 8 . 9 . *** WARNING in line 23 Procedure SELECT: Missing values for series ====> MISS: 9 Current sample: 1 to 9 *** WARNING in line 24 Procedure GENR: Missing values for series ====> MISS: 9 *** WARNING in line 24 Procedure GENR: Some elements of a series set to missing values due to missing values. Number ====> 9 *** WARNING in line 25 Procedure WRITE: Missing values for series ====> MISS: 9 MISS 1 . 2 . 3 . 4 . 5 . 6 . 7 . 8 . 9 . Equation 2 ============ Method of estimation = Ordinary Least Squares Dependent variable: X Current sample: 1 to 9 Number of observations: 9 Mean of dep. var. = 5.00000000 Std. dev. of dep. var. = 2.73861279 Sum of squared residuals = 0. Variance of residuals = 0. Std. error of regression = 0. R-squared = 1.000000000 Adjusted R-squared = 1.000000000 LM het. test = 10.3356233 [.001] Durbin-Watson = 0. F (zero slopes) = .850705917E+38 [.000] Schwarz B.I.C. = -.850705917E+38 Log likelihood = .850705917E+38 Estimated Standard Variable Coefficient Error t-statistic P-value C .353485762 0. .850705917E+38 [.000] X2 1.14234114 0. .850705917E+38 [.000] X3 -.704945372 0. .850705917E+38 [.000] X4 .262352714 0. .850705917E+38 [.000] X5 -.061634989 0. .850705917E+38 [.000] X6 .920535839E-02 0. .850705917E+38 [.000] X7 -.847477440E-03 0. .850705917E+38 [.000] X8 .438350400E-04 0. .850705917E+38 [.000] X9 -.974111999E-06 0. .850705917E+38 [.000] Equation 3 ============ Method of estimation = Ordinary Least Squares Dependent variable: X Current sample: 1 to 9 Number of observations: 9 Mean of dep. var. = 5.00000000 Std. dev. of dep. var. = 2.73861279 Sum of squared residuals = 0. Variance of residuals = 0. Std. error of regression = 0. R-squared = 1.000000000 Adjusted R-squared = 1.000000000 LM het. test = 13.1693542 [.000] Durbin-Watson = 0. F (zero slopes) = .850705917E+38 [.000] Schwarz B.I.C. = -.850705917E+38 Log likelihood = .850705917E+38 Estimated Standard Variable Coefficient Error t-statistic P-value C -.177635684E-14 0. .850705917E+38 [.000] X 1.000000000 0. .850705917E+38 [.000] Equation 4 ============ Method of estimation = Ordinary Least Squares Dependent variable: X Current sample: 1 to 9 Number of observations: 9 Mean of dep. var. = 5.00000000 Std. dev. of dep. var. = 2.73861279 Sum of squared residuals = 60.0000000 Variance of residuals = 10.0000000 Std. error of regression = 3.16227766 R-squared = 0. Adjusted R-squared = -.333333333 LM het. test = 0. [1.00] Durbin-Watson = .133333333 [<.011] Jarque-Bera test = .567337500 [.753] Ramsey's RESET2 = .850705917E+38 [.000] Schwarz B.I.C. = 2.62952818 Log likelihood = -21.3074867 Estimated Standard Variable Coefficient Error t-statistic P-value C 5.00000000 1.05409255 4.74341649 [.001] BIG 0. 0. 0. [1.00] LITTLE 0. 0. 0. [1.00] *** WARNING in line 31 Procedure OLSQ: At least one coefficient in the table above could not be estimated due to singularity of the data. Equation 5 ============ Method of estimation = Ordinary Least Squares Dependent variable: ZERO Current sample: 1 to 9 Number of observations: 9 Mean of dep. var. = 0. Adjusted R-squared = -.142857143 Std. dev. of dep. var. = 0. LM het. test = 0. [1.00] Sum of squared residuals = 0. Durbin-Watson = 0. Variance of residuals = 0. Schwarz B.I.C. = -.850705917E+38 Std. error of regression = 0. Log likelihood = .850705917E+38 R-squared = 0. Estimated Standard Variable Coefficient Error t-statistic P-value C 0. 0. .850705917E+38 [.000] X 0. 0. .850705917E+38 [.000] Univariate statistics ===================== Number of Observations: 9 Mean Std Dev Minimum X9 63811665.00000000 129032715.74238208 1.00000000 X9S 63811664.11111114 129032712.89820277 1.00000000 RES9 0.88888884 3.05959331 -1.00000000 Maximum X9 387420489.00000023 X9S 387420480.00000011 RES9 9.00000000 ******************************************************************************* END OF OUTPUT FOR USER NASTY TOTAL NUMBER OF WARNING MESSAGES: 10 MEMORY USAGE: ITEM: DATA ARRAY TOTAL MEMORY UNITS: (4-BYTE WORDS) (MEGABYTES) MEMORY ALLOCATED : 500000 4.0 MEMORY ACTUALLY REQUIRED : 2668 2.1 CURRENT VARIABLE STORAGE : 2086