.-
help for ^ssizebi^
.-

Sample size and power calculation for the comparison of two or more proportions
-------------------------------------------------------------------------------

^ssizebi^ p1 p2 ... pK [^, ng^roup^(^#^) ar^atio^(^#1 #2 ... #K^) a^lpha^(^#^)^
          ^p^ower^(^#^) n(^#^) co^ndit no^lo^cal ^tr^end ^do^ses^(^#1 #2 ... #K^)^


Description
-----------

^ssizebi^ estimates power or total sample size for tests comparing K
proportions. Power is calculated if ^n()^ is specified as a positive number,
otherwise total sample size is estimated. 

^ssizebi^ computes sample size/power for the (global/trend) unconditional
chisquare test or the conditional test based on the hypergeometric distribution
with the one-step Peto approximation to the odds ratio (OR). Sample size/power
is calculated in the unconditional case under either local or distant
alternatives. Under local alternatives (eg max(OR,1/OR)<=2), ^ssizebi^ uses the
null covariance matrix under both null and alternative hypotheses. The
unconditional test with local alternatives is the usual Pearson chisquare test.
Local alternatives are assumed in the conditional case.


Options
-------

^ng^roup^(^#^)^ is the number of comparative groups. The default is
^ng^roup^(^K^)^, where K is number of specified proportions. If ^ng^group^( )^
specifies a number m greater than K (the number of the given proportions
p1 p2 ... pK), the default value of each of the remaining m-K proportions is 
the mean of p1,p2, ... pK.

^ar^atio^(^#1 #2 ... #K^)^ is the allocation ratio. The default is equal sample
sizes.

^al^pha^(^#^)^ specifies the significance level of the test; the default is 
    ^al^pha^(.05)^.

^po^wer^(^#^)^ is power of the test.  Default is ^po^wer^(.80)^.

^n(^#^)^ is the total sample size.  If specified and is positive, ^ssizebi^
reports power.  If not specified or specified as ^n(^0^)^, sample size is
reported.

^co^ndit indicates a conditional test (fixed total number of events).

no^lo^cal specifies non-local alternative. The default is ^lo^cal.

^tr^end indicates a test for trend

^do^ses^(^#1 #2 ... #K^)^ specifies doses in a dose-response (linear trend) test.
The default, if ^tr^end is specified, is ^do^ses^(^1 2 ... K^)^


Examples
--------

 1. Comparing two proportions p1 and p2 unconditionally:

 . ^ssizebi^ .25 .35

   or
  . ^ssizebi^ .25 .35, noloc


 2. Comparing four groups conditionally with event probability .15 in the
    control group and max difference .1:

 . ^ssizebi^ .15 .25^,ng^roup^(^4^) co^ndit


 3. Compute power for linear trend test in tree groups:

 . ^ssizebi^ .15 .2 .25^,ng^roup^(^3^) ^tr^end ^n(^0^)^


  4. Sample size for global chisquare test comparing three groups with unequal
     allocation.

 . ^ssizebi^ .15 .2 .25^,ng^roup^(^3^) ^ar^atio(1 2 2) ^no^loc
