PEPI Version 3.01:  UPDATE
~~~~~~~~~~~~~~~~~~~~~~~~~~
The main changes since Version 3.0 are in CONFINT, KAPPA,
MANNWHIT and SCRN.

CONFINT
~~~~~~~
1. CONFINT provides new confidence intervals for a difference
between independent proportions, based on continuity-corrected
score intervals for the two proportions.  These have advantages
over the other intervals computed (Fleiss's simple asymptotic
methods, continuity-corrected).

   Computation is based on the procedure referred to as
Method 11 by Newcombe RG (1998). The upper and lower confidence
limits of the two proportions are computed by formulae 1.26 and
1.27 in Fleiss (1981, p. 14) and substituted for l1, l2, u1 and
u2 in Newcombe's formulae for L and U.  

2. CONFINT now provides confidence intervals for a difference
between proportions in paired data, computed by the method
described by Armitage and Berry (1994, p. 128) and by Lloyd's
modification of this method (Lloyd 1998).

   The Armitage-Berry intervals are approximate ones based on
the exact (Fisher's and mid-P) confidence limits of the
proportions in each of the two discrepant cells (proportions of
the total number of discrepant pairs).  They do not take account
of variation in the total number of discrepant pairs, and are
therefore unduly narrow.

   Lloyd's modification takes account of variability in the
total number of discrepant pairs.  However, these intervals too
are approximate, although they are based on exact mid-P or Fisher
confidence limits for both the distributioon of discordant pairs
and the proportion of discrepant pairs (among all pairs).  

KAPPA
~~~~~
1, KAPPA now calculates the percentage agreement for stratified data
(two sets of ratings, two categories), using averages weighted by
sample sizes.  The sample sizes are the total number of ratings
in the stratum (for overall agreement) or the numbers of positive
or negative ratings (for the pervcentage of agreement for positive
and negative ratings respectively).

2. KAPPA now provides confidence intervals for sample-sizes-adjusted
kappa (Barlow et al 1991).

MANNWHIT
~~~~~~~~
1. MANNWHIT now provides two tests for general differences between
the distributions compared - the Kolmogorov-Smirnov two-sample
test and the Cramer-von Mises test.

   The Kolmogorov-Smirnov test (Siegel and Castellan 1988, pp
144-151) is performed if both sample sizes exceed 2.  The test
statistic D is computed by formula 6.18 in Siegel and Castellan
1988 (p. 145).  If sample sizes are small, exact P-values are
reported as P <0.001, <0.01, <0.05, <0.1 or >0.1; for P <0.001,
with both sample sizes 20 or less, these are based on Table A.10
in Hollander and Wolfe (1999, pp 606-630);  for the other critical
values, with both sample sizes 25 or less, the source is Table I.II
in Siegel and Castellan (1988, pp 350-351).  For larger samples,
approximate P-values are reported as P <0.001, <0.005, <0.01, <0.025,
<0.05, <0.1 or >0.1, using the formulae in Table I.III in Siegel
and Castellan (1988, p. 352).  
 
   The Cramer-von Mises test (Sprent 1993, pp 127-128) is now
provided for tabular as well as numerical data; it is performed if
both sample sizes exceed 3.  If the sum of the two sample sizes is
less than 18, exact P-values are now displayed, as P <0.001, <0.01,
<0.05, <0.1 or >0.1 (source: Burr EJ 1964).  In other instances, the
approximate values are calculated as before, using an adaptation of
a Fortran procedure from David Baird's library of goodness of fit
statistics (EMPCDF.SRC).  For numerical data, ties are handled in
the manner demonstrated in Sprent's example, by comparing the
cumulative relative frequencies in the two samples at each point,
tied observations being put at the same point.  For tabular data,
ties are handled as follows: if the frequencies in a category are 3
and 7, the cumulative relative frequencies are compared several
times - first after entry of each of the 3 pairs of observations
(one in each sample), and then after entry of each of the 4 remaining
observations.  

2. MANNWHIT now computes approximate confidence intervals for the odds
in favour of a higher value in one group than in the other.  These
are based on confidence intervals for the probability that a random
value in one group will be less than a random value in the other group,
calculated by the method proposed by Halperin, Gilbert and Lachin
(1987), as described by Hollander and Wolfe (1999: formula 4.37).

3. MANNWHIT now makes a correction for ties in the calculation of
Kendall's rank correlation coefficient (Siegel and Castellan 1988, 249,
formula 9.10).  

SCRN
~~~~
SCRN now computes Kullback-Leibler distances, both for tests that yield
dichotomous results and for those that provide a range of values.  These
distances, which are measures of the discrepancy between two probability
distributions, can be used as measures of the extent to which
performing a test can be expected to alter the odds in favour of
correct decisions in "ruling in" positives or in "ruling out" negatives.
This may be helpful in situations where a choice must be made between
tests, as suggested by Lee (1999), who provides formulae.


Minor changes
~~~~~~~~~~~~~
In computing intervals for a difference between proportions (Fleiss's
formulae) PAIRS now uses z only; previously, t was used if N < 50.
PAIRS can now accept 60 strata instead of 20..

   Additional measures have been taken to avoid program abortion, e.g. 
in CONFINT (when very small numbers including a zero or two zeros are
entered).  Zero values are now altered in COMBINE (zero lower confidence
limit for an odds ratio or rate ratio changed to 0.0000001) and RATES2
(some zero intermediate values changed to 0.000001, if there are only
100% differences in the strata, with an equal number of differences in
each direction)  If the odds ratio for combined strata is 1, CASECONT
takes its limits as 0.99999 and 1.00001 when computing Cornfield-Gart
intervals.  In some instances, procedures are skipped to avoid run-time 
errors, and a "not computed" message is displayed.


Errors corrected
~~~~~~~~~~~~~~~~
CASECONT: slight error in computation of Cornfield-Gart intervals.
CHISQ: error in computation of P from z for Haldane's big-table test.
CONFINT: error in C.I. for difference between proportions.
KAPPA: error in nonzero standard deviations.
LOGISTIK: problems in reading REC files with records exceeding 255
characters, or with very large numeric fields.
MANTELX: reciprocal of odds ratio shown if variable Y is a dichotomy,
and signs of regression and correlation coefficients sometimes wrong.
PAIRS: error in display of results for cluster data.
POISSON: observed:expected ratio shown as zero if observed number <20.
TIMES: years divisible by 400 not recognized as leap years.
WHATS: failure to recalculate stored formulae containing pi.



References
~~~~~~~~~~
Armitage P, Berry G (1994) Statistical methods in medical research,
3rd edn. Oxford: Blackwell Scientific Publications.

Barlow W, Lai M-Y, Azen SP (1991) A comparison of methods for
calculating a stratified kappa. Statistics in Medicine 10:1465-1472.

Burr EJ (1964) Small-sample distributions of the two-sample Cramer-
von Mises' W^2 and Watson's U^2, Annals of Mathematical Statistics
35:1091-1898.

Fleiss JL (1981) Statistical methods for rates and proportions. New
York: John Wiley and Sons.

Halperin M, Gilbert PR, Lachin JM (1987) Distribution-free confidence 
intervals for Pr(X1<X2).  Biometrics 43:71-80.

Hollander M, Wolfe DA (1999) Nonparametric statistical methods, 2nd
edn. New York: John Wiley & Sons.

Lee W-C (1999) Selecting diagnostic tests for ruling out or ruling in 
disease: the use of the Kullback-Leibler distance. International
Journal of Epidemiology 28:521-525.

Lloyd CJ (1990) Confidence intervals from the difference between two
correlated proportions. Journal of the American Statistical
Association 85:1154-1158.

Newcombe RG (1998) Interval estimation for the difference between
independent proportions: comparison of eleven methods. Statistics in
Medicine 17:873-890. 

Siegel S, Castellan NJ Jr (1988) Nonparametric statistics for the
behavioral sciences, 2nd edn. New York: McGraw-Hill.

Sprent P (1993) Applied nonparametric statistical methods, 2nd edn.
London: Chapman & Hall.

    
