/stat/chien/JULY95/WWW directory will contain the followings. 1. JASA 1997 "Approximating the distribution of the scan statistic using moments of the number of clumps" --------------------------------------------------------------- C programs --------------------------------------------------------------- moment_four.c: The output of this C program will print out MAPLE expressions for the first four moments. moment_two.c: same as moment_four.c except it just prints out the first two moments. ---------------------------------------------------------------- C outputs from moment_four.c : The output stores the polynomial expressions of first four moments. For example m=3, we execute the command `a.out 3 xxx(name of output file)`. (Without a special name of executable file, we use a.out 3 xxx (gcc moment_four.c -lm) If you want to create the executable file, say 'sss', use gcc -o sss moment_four.c -lm you can get the output file using sss 3 xxx ---------------------------------------------------------------- BE AWARE THAT THE OVERFLOW PROBLEM MAY OCCUR WHEN m > 10 in moment_four.c or m > 22 in moment_two.c ---------------------------------------------------------------- MAPLE programs ---------------------------------------------------------------- maplecode: This file contains several procedures for approximations and bounds to P(Y>=1), or approximations to P(Y>=j), j=2, 3,4,5. To run MAPLE we start with reading the codes inside this file. If you are running MAPLE inside the same working directory, you may just use read `maplecode`; Otherwise, you may need to include the directory to above command, say read `directory/maplecode`; For m<=10: ------------ MAPLE reads in the C outputs of expressions for the first four moments which are named m1,m2,m3,m4 by the READMOM procedure. For example, use readmom(8); to get the expressions for m=8; Again you may want to change the READ command following the description above. Read the beginning section of the file for more detail instructions. The SETVAL procedure computes the first four moments and first four cumulants for various values of d and n. For instances, use setval(.035,100); to get the first four moments and cumulants for d=0.035, n=100. For m>10: ----------- The FSMVAL procedure can compute the first two moments and the first two cumulants by using a faster routine. For example, use fsmval(50,.03,1000); to get the first two moments and cumulants for m=50, d=0.03, n=1000. You can execute mc2() or cpg2(jmax) (described in the following paragraph) after this procedure in order to get the approximations for larger value of m. To test the methods mentioned in the paper you use the following commands: bounds() to get LB and UB. klb() to get KLB for GLAZ[1989, eq. (2.12)]. mc2() to get MC2. lp4(pval) to get LP4. pval=0, not printing out the values of lambda's. =1, o.w. cpg2(jamx) to get CPG2, cpg4(jmax) to get CPG4, gcp(jmax) to get GCP for GLAZ[1994, eq. (3.4)] for P(Y>=j). jmax represents the maximum value of j above. ap() to get AP1, AP2, AP3, AP4 for Huffer and Lin (1995). ---------------------------------------------------------------------- 2. CSDA 1997 "Computing the exact distribution of the extremes of sums of consecutive spacings" ---------------------------------------------------------------------- C programs --------------------------------------------------------------- scan.c: The output will print out the (checker) value for the purpose of examining the overflow problem and the polynomial expressions for evaluation. ---------------------------------------------------------------- Use the following command to compile the program gcc scan.c -lm (or gcc -o sss(executable file) scan.c -lm) Use the following command to get the results a.out p k xxx(output file) (or sss p k xxx) 'p' represents the value of the number of 1's in each row 'k' represents the value of the number of columns in the matrix NOTE: THE scan.c PROGRAM IS ONLY GOOD FOR SCAN STATISTIC. FOR BOTH TYPES OF ARBITRARY BINARY MATRIX PROBLEMS (INCLUDES SUMMATION OF SEVERAL MATRICES) PLEASE USE general_type.c PROGRAM. general_type.c ------------------------------------------------------------------- This program can handle several binary matrices together and both types of problem. You will need to create one input file, eg, datafile, first. Say, there are 4 matrices and each has different dimensions and coefficients. The way of setting up is the followings. 4 -------- # of matrices 1 3 -120 -------- (row col coefficient to the matrix) 1 1 1 ---------(matrix) 2 4 14 -------- (row col coefficient to the matrix) 1 1 1 0 ---------(matrix) 0 1 1 1 2 5 12 -------- (row col coefficient to the matrix) 1 1 1 0 0 ---------(matrix) 0 0 1 1 1 2 6 30 -------- (row col coefficient to the matrix) 1 1 1 0 0 0 ---------(matrix) 0 0 0 1 1 1 Use the following command to compile the program gcc general_type.c -lm (or gcc -o sss(executable file) general_type.c -lm) Use the following command to get the results a.out type datafile xxx(output file) (or sss type datafile xxx) 'type' takes value 1 or 2 which representing type 1 or 2 problem