home *** CD-ROM | disk | FTP | other *** search
/ Between Heaven & Hell 2 / BetweenHeavenHell.cdr / 500 / 473 / multi.arc / PC-SIZE.DOC < prev    next >
Text File  |  1986-01-08  |  32KB  |  897 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7.  
  8.                                    PC-SIZE
  9.                    A Program for Sample Size Determinations
  10.                                  Version 2.0
  11.                                 August 8, 1985
  12.  
  13.  
  14.                                Gerard E. Dallal
  15.  
  16.                 USDA Human Nutrition Research Center on Aging
  17.                              at Tufts University
  18.                             711 Washington Street
  19.                               Boston, MA  02111
  20.  
  21.                                      and
  22.  
  23.                      Tufts University School of Nutrition
  24.                               132 Curtis Street
  25.                               Medford, MA  02155
  26.  
  27.         PC-SIZE determines the sample size  requirements  for  single
  28.         factor experiments, two factor experiments, randomized blocks
  29.         designs, and paired t-tests.  In generic F mode,  PC-SIZE can
  30.         determine  sample sizes for any experiment in which the power
  31.         at the alternative is given by a non-central  F  distribution
  32.         with fixed numerator degrees of freedom,  denominator degrees
  33.         of freedom that are linear in the sample  size,  and  a  non-
  34.         centrality parameter that is proportional to the sample size.
  35.         PC-SIZE can determine the sample size needed to detect a non-
  36.         zero  population correlation coefficient when sampling from a
  37.         bivariate normal distribution.  It can also be used to obtain
  38.         the common sample size required to test the equality  of  two
  39.         proportions.  PC-SIZE  can  calculate  the  power of specific
  40.         sample sizes as well as determine the sample size  needed  to
  41.         achieve specific power.
  42.  
  43.  
  44.  
  45.  
  46.                                     NOTICE
  47.  
  48.         Documentation and original code copyright 1985 by  Gerard  E.
  49.         Dallal.  Reproduction of material for non-commercial purposes
  50.         is   permitted,   without  charge,   provided  that  suitable
  51.         reference is made to PC-SIZE and its author.
  52.  
  53.         Neither PC-SIZE nor its documentation should be  modified  in
  54.         any way without permission from the author,  except for those
  55.         changes  that  are  essential  to  move  PC-SIZE  to  another
  56.         computer.
  57.  
  58.  
  59.  
  60.                                                                PAGE 2
  61.  
  62.  
  63.  
  64.         Please acknowledge PC-SIZE in any manuscript  that  uses  its
  65.         calculations.
  66.  
  67.  
  68.  
  69.  
  70.                               TABLE OF CONTENTS
  71.  
  72.         Features..................................................  2
  73.         Installation..............................................  3
  74.         Operation.................................................  3
  75.             Specifying the design.................................  4
  76.             Specifying the alternative............................  4
  77.             Generic F mode........................................  5
  78.             Initial approximation.................................  5
  79.         Correlation coefficient...................................  5
  80.         Proportions...............................................  6
  81.         Other applications........................................  6
  82.             Two sample t-test.....................................  6
  83.             Comparing a single sample to a known standard.........  6
  84.         Power of specific sample sizes............................  7
  85.         Non-centrality parameters.................................  7
  86.         Validation................................................  9
  87.         Algorithms................................................ 14
  88.         References................................................ 15
  89.         Sample size tables for the correlation coefficient........ 16
  90.  
  91.  
  92.  
  93.  
  94.                                    FEATURES
  95.  
  96.         1.  Flexibility:
  97.  
  98.             Query  system for single factor,  two factor,  randomized
  99.                blocks designs and paired t-tests.
  100.  
  101.             Generic Mode permits sample size  calculations  for  many
  102.                problems  in  which  the  power  at the alternative is
  103.                given by the non-central F distribution.
  104.  
  105.         2.  Portability:  PC-SIZE is written in FORTRAN 77,  but  not
  106.             too  far  from the 66 standard.  To make PC-SIZE run on a
  107.             VAX, for example,  all you need do is modify the I/O unit
  108.             numbers  (contained  in  a  single DATA statement) and an
  109.             OPEN statement.
  110.  
  111.  
  112.         PC-SIZE                                           G.E. Dallal
  113.  
  114.  
  115.  
  116.                                                                PAGE 3
  117.  
  118.  
  119.  
  120.         3.  PC-SIZE will calculate the power  of  a  specific  sample
  121.             size  as  well  as  the  sample  size required to achieve
  122.             specific power.
  123.  
  124.         4.  Calculations may be saved in a designated output file.
  125.  
  126.         5.  Double precision calculations are used throughout.
  127.  
  128.         6.  Quantities  contained  in  square brackets at the prompts
  129.             are default values which can be obtained by pressing  the
  130.             return  key.  Default  values are updated with the latest
  131.             entry for each quantity,  thereby simplifying the task of
  132.             requesting  a  number  of  sample  size calculations that
  133.             share many of the same specifications.
  134.  
  135.         7.  Trailing decimal points may be omitted or included as you
  136.             wish.
  137.  
  138.  
  139.  
  140.                                  INSTALLATION
  141.  
  142.         PC-SIZE is written for the  IBM-PC.  Installation  on  a  new
  143.         computer may entail modifying the following statements:
  144.  
  145.         The first DATA statement:
  146.  
  147.                       IIN -- input unit number (screen)
  148.                      IOUT -- output unit number (screen)
  149.                     IWOUT -- save file unit number
  150.                     NMAX0 -- large integer constant (the
  151.                                largest sample size that can
  152.                                be considered)
  153.  
  154.         The  OPEN  statement  for the save file just before statement
  155.         10.
  156.  
  157.  
  158.  
  159.  
  160.                                   OPERATION
  161.  
  162.         Operation  begins  with  the user specifying the level of the
  163.         test and the power required at the alternative.  PC-SIZE will
  164.         report the number of observations per cell, per group (in the
  165.         case of proportions), or per randomized block.
  166.  
  167.  
  168.         PC-SIZE                                           G.E. Dallal
  169.  
  170.  
  171.  
  172.                                                                PAGE 4
  173.  
  174.  
  175.  
  176.  
  177.                             Specifying the Design
  178.  
  179.         Single factor designs:  The user is prompted for  the  number
  180.         of groups.
  181.  
  182.         Two  factor  designs:  The user is prompted for the number of
  183.         levels of each factor. (PC-SIZE assumes that the calculations
  184.         are being carried out for the main effects of Factor A.)  The
  185.         user can then indicate whether an interaction  term  will  be
  186.         present  in  the model and the ANOVA table.  (A * B * (N - 1)
  187.         denominator degrees of freedom,  where 'A' and  'B'  are  the
  188.         number  of  levels  of  the  two  factors,  if interaction is
  189.         present; A*B*N - A - B + 1 denominator degrees of freedom, if
  190.         not.)
  191.  
  192.         Randomized blocks designs:  The  user  is  prompted  for  the
  193.         number of levels of the treatment factor.  PC-SIZE calculates
  194.         the  number  of  blocks  needed  to achieve the desired power
  195.         assuming each block receives one complete set of treatments.
  196.  
  197.         Paired  t-tests:  The  user  is  prompted  for  the  expected
  198.         difference and the standard deviation of the differences.
  199.  
  200.  
  201.                           Specifying the Alternative
  202.  
  203.         In  the  cases of single factor,  two factor,  and randomized
  204.         blocks  designs,   the  user  is  given  three  options   for
  205.         specifying  the  alternative  at  which  the  power  is to be
  206.         evaluated:
  207.  
  208.         1.  Specifying the individual effects.  PC-SIZE automatically
  209.             centers the effects about zero.  It is not  necessary  to
  210.             subtract the mean from each effect before entry.
  211.  
  212.         2.  Specifying  a  range  (a  single number) for the effects.
  213.             The minimum and maximum effects are assumed to occupy the
  214.             endpoints  of  the  range  with  the  remaining   effects
  215.             distributed uniformly throughout.
  216.  
  217.         3.  Specifying  the  average squared effect (where,  for this
  218.             option,  the mean has been subtracted  from  each  effect
  219.             before squaring) divided by the error variance.
  220.  
  221.  
  222.  
  223.  
  224.         PC-SIZE                                           G.E. Dallal
  225.  
  226.  
  227.  
  228.                                                                PAGE 5
  229.  
  230.  
  231.         
  232.                                 Generic F Mode
  233.  
  234.         Generic mode  requires more sophistication on the part of the
  235.         user but is capable of handling a wide variety  of  problems,
  236.         specifically,   any  problem  for  which  the  power  at  the
  237.         alternative is given by a  non-central  F  distribution  with
  238.         fixed  numerator  degrees of freedom,  denominator degrees of
  239.         freedom that are linear  in  the  sample  size,  and  a  non-
  240.         centrality  parameter  that is a multiple of the sample size.
  241.         (Non-centrality parameters are discussed below.)  The user is
  242.         prompted for the numerator degrees  of  freedom,  the  linear
  243.         function that defines the denominator degrees of freedom, and
  244.         the  multiple  of  the  sample  size  that  defines  the non-
  245.         centrality parameter.
  246.  
  247.  
  248.                             Initial Approximation
  249.  
  250.         PC-SIZE invokes a "large sample approximation" (using a  non-
  251.         central chi-square power function in place of the non-central
  252.         F)  to  get  a rough estimate the necessary sample size.  The
  253.         power is calculated at increments of 1  if  the  estimate  is
  254.         less  than  500,  10 if the estimate is between 500 and 5000,
  255.         100 if the estimated is between 5000 and 50000,  and  so  on.
  256.         The  calculations  start at the large sample estimate less 5%
  257.         or a count of  10,  whichever  is  greater,  rounded  to  the
  258.         nearest  increment,  and continue until the required power is
  259.         obtained.  The correlation coefficient  and  proportions  are
  260.         handled differently--see below.
  261.  
  262.  
  263.  
  264.  
  265.                            CORRELATION COEFFICIENT
  266.  
  267.         This mode is used  when  sampling  from  a  bivariate  normal
  268.         population,  neither of the two variables having  its  values
  269.         fixed  prior  to sampling.  PC-SIZE will calculate the sample
  270.         size needed to carry out a two-tailed test of the  hypothesis
  271.         that  the  population correlation coefficient is 0.  The user
  272.         is prompted for a non-null value of the coefficient.
  273.  
  274.         Note:  The distribution of the sample correlation coefficient
  275.         when  the  population  value  is non-zero is obtained through
  276.         numerical integration using Simpson's Rule  with  some  bells
  277.         and  whistles  to  speed  up  convergence.  Ordinates  of the
  278.  
  279.  
  280.         PC-SIZE                                           G.E. Dallal
  281.  
  282.  
  283.  
  284.                                                                PAGE 6
  285.  
  286.  
  287.         density function are calculated recursively,  resulting in an
  288.         execution time that is proportional to sample size.
  289.  
  290.         PC-SIZE  reports  the  power  of the test for sample sizes 3,
  291.         (2**K:  K=2,3,...) successively until the required  power  is
  292.         exceeded.   A   binary  search  is  them  carried  out  (with
  293.         intermediate results NOT  reported)  to  locate  the  minimum
  294.         adequate  sample  size.  If  the  sample  size is large,  the
  295.         binary search can consume large amounts  of  execution  time.
  296.         Tables  beginning on page XX,  produced by PC-SIZE,  give the
  297.         necessary sample size for tests of power 0.50(0.10)0.90, 0.95
  298.         at levels 0.05 and 0.01 for underlying population correlation
  299.         coefficients of 0.05, 0.10(0.10)0.90.
  300.  
  301.  
  302.  
  303.  
  304.                                  PROPORTIONS
  305.  
  306.         PC-SIZE  uses  formulas  3.14  and  3.15  of  Fleiss(1981) to
  307.         determine the common sample size for a test of  the  equality
  308.         of   two  proportions.   This  estimate  is  a  large  sample
  309.         approximation based on standard normal theory.  The  user  is
  310.         prompted   for  the  values  of  the  proportions  under  the
  311.         alternative to equality.
  312.  
  313.         In some instances the values produced by PC-SIZE  will  be  1
  314.         greater  than  those  in  Fleiss's  Table  A.3.   Fleiss  has
  315.         apparently taken the values  produced  by  the  formulae  and
  316.         rounded to the nearest integer.  PC-SIZE reports the smallest
  317.         integer not less than the the results of the formulae.
  318.  
  319.  
  320.  
  321.  
  322.                               OTHER APPLICATIONS
  323.  
  324.  
  325.                               Two Sample t-test
  326.  
  327.         This is a single factor analysis of variance with two groups.
  328.  
  329.  
  330.                 Comparing a Single Sample to a Known Standard
  331.  
  332.         Use the paired t-test mode setting the "expected  difference"
  333.         to  the  expected  difference  between the unknown population
  334.  
  335.  
  336.         PC-SIZE                                           G.E. Dallal
  337.  
  338.  
  339.  
  340.                                                                PAGE 7
  341.  
  342.  
  343.         mean and the known standard.  Set the "estimate  of  standard
  344.         deviation of difference" to the estimated population standard
  345.         deviation.
  346.  
  347.  
  348.  
  349.  
  350.                        POWER OF SPECIFIC SAMPLE SIZES
  351.  
  352.         PC-SIZE will perform power calculations for  specific  sample
  353.         sizes  as  well  as  determine  the  sample  size required to
  354.         achieve specific power.  If the requested power is an integer
  355.         greater  than  or  equal  to  1,  PC-SIZE  starts  its  power
  356.         calculations  at  a sample size equal to the requested power.
  357.         The user is prompted for an increment and a stopping value.
  358.  
  359.  
  360.  
  361.  
  362.                           NON-CENTRALITY PARAMETERS
  363.  
  364.         Different  authors  use  different  definitions  of  the non-
  365.         centrality parameter of the non-central F  distribution.  The
  366.         differences  typically  involve  a  square root,  a factor of
  367.         (numerator degrees of freedom + 1),  and/or a  factor  of  2.
  368.         PC-SIZE  follows  the  notation  of  Kendall and Stuart(1973,
  369.         pp.237,262):  The sum  of  the  squares  of  "d"  independent
  370.         normal  variables  with arbitrary means and unit variances is
  371.         said to follow a non-central chi-square distribution with "d"
  372.         degrees of freedom and non-centrality parameter equal to  the
  373.         sum  of  the  squared means.  The ratio of a non-central chi-
  374.         square  variable  with  "d1"  degrees  of  freedom  and  non-
  375.         centrality  parameter  "lambda",   divided  by  "d1",  to  an
  376.         independent central chi-square variable with "d2" degrees  of
  377.         freedom,  divided by "d2",  is said to follow a non-central F
  378.         distribution with "d1" numerator  degrees  of  freedom,  "d2"
  379.         denominator degrees of freedom,  and non-centrality parameter
  380.         "lambda".   Scheffe(1959,p.414)  defines  his  non-centrality
  381.         parameter to be the square root of this quantity.
  382.  
  383.         Following  Graybill(1961,  Theorem 11.16),  a  non-centrality
  384.         parameter can be obtained as the numerator degrees of freedom
  385.         times (the difference between  the  numerator  expected  mean
  386.         square and the error variance) divided by the error variance.
  387.         It  is  assumed  that  the  error  variance  is  given by the
  388.         expected mean square of the denominator of the F-ratio.
  389.  
  390.  
  391.  
  392.         PC-SIZE                                           G.E. Dallal
  393.  
  394.  
  395.  
  396.                                                                PAGE 8
  397.  
  398.  
  399.         The following notation is used throughout this section:
  400.  
  401.               ALPHA  -- level of the test
  402.               POWER  -- power at the alternative
  403.               K      -- number of effects under test
  404.                           (number of groups, levels,...)
  405.               F1     -- numerator degrees of freedom
  406.               F2     -- denominator degrees of freedom
  407.               AVGESQ -- average squared effect divided by
  408.                            the error variance
  409.               LAMBDA -- non-centrality parameter
  410.               N      -- sample size
  411.               EVAR   -- error variance (often within cell)
  412.               EFF(I) -- the I-th of the effects under test
  413.  
  414.                    [ AVGESQ = (SUM(EFF(I)**2) / K) / EVAR ]
  415.  
  416.  
  417.  
  418.         1.  Single Factor Experiment (K Groups):
  419.  
  420.                   LAMBDA = N * SUM(EFF(I)**2) / EVAR
  421.                          = N * K * AVGESQ
  422.  
  423.  
  424.         2.  Two Factor Experiment (Factor A -- "A" levels;  Factor  B
  425.             -- "B" levels):
  426.  
  427.             Main effects for Factor A:
  428.                   LAMBDA = N * B * SUM(EFF(I)**2) / EVAR
  429.                          = N * A * B * AVGESQ
  430.  
  431.             Two factor interaction:
  432.                   LAMBDA = N * SUM(EFF(I)**2) / EVAR
  433.                          = N * A * B * AVGESQ
  434.  
  435.         3.  Randomized  blocks  designs (Single treatment factor at K
  436.             levels):
  437.  
  438.                   LAMBDA = N * SUM(EFF(I)**2) / EVAR
  439.                          = N * K * AVGESQ
  440.  
  441.  
  442.         4.  Simple linear regression:  E(Y(i)) = C0 + C1 * X(i)
  443.            (N observations at each X(i), i=1,...,p, with mean 0)
  444.  
  445.                   LAMBDA = N * (C1**2 * SUM(X(I)**2)) / EVAR
  446.  
  447.  
  448.         PC-SIZE                                           G.E. Dallal
  449.  
  450.  
  451.  
  452.                                                                PAGE 9
  453.  
  454.  
  455.  
  456.  
  457.         5.  Quadratic regression:
  458.                    E(Y(i)) = C0 + C1 * X(i) + C2 * X(i)**2
  459.  
  460.             H0:  C1 = C2 = 0:
  461.                                LAMBDA=
  462.              N * (C1**2 * SUM(X(i)**2)+ 2 * C1 * C2 * SUM(X(i)**3
  463.                         + C2**2 * SUM(X(i)**4) / EVAR
  464.  
  465.             H0:  C2 = 0
  466.                         LAMBDA = C2**2 * SUM(X(i)**4)
  467.  
  468.  
  469.  
  470.  
  471.  
  472.                                   VALIDATION
  473.  
  474.         PC-SIZE was validated by applying it to all of  the  examples
  475.         from  sections  3.2 through and including 3.6 of Odeh and Fox
  476.         (1975) which were reproduced with the following exceptions:
  477.  
  478.         example 3.3.1 (main effects for A with no interaction in  the
  479.            model):  OF estimate 3.  PC-SIZE calculates the power of a
  480.            sample of size 3 to be 0.79896 (<0.80).  4 are needed.
  481.  
  482.         example  3.5.2  (test  of  quadratic  regression  term):   OF
  483.            estimate  40.  PC-SIZE calculates the power of a sample of
  484.            size 40 to be 0.94796 (<0.95).  41 are needed.
  485.  
  486.         example 3.6.2 (multivariate t-test):  OF  estimate  100.  PC-
  487.            SIZE  calculates  the  power of a sample of size 100 to be
  488.            0.99484 (<0.995). 101 are needed.
  489.  
  490.  
  491.         The  values  of  the  arguments and the resulting sample size
  492.         estimates from PC-SIZE are:
  493.  
  494.  
  495.                            Single Factor Experiment
  496.                                   (K Groups)
  497.  
  498.                     LAMBDA = N * SUM(EFF(I)**2) / EVAR
  499.                            = N * K * AVGESQ
  500.  
  501.         Example 3.2.1:
  502.  
  503.  
  504.         PC-SIZE                                           G.E. Dallal
  505.  
  506.  
  507.  
  508.                                                               PAGE 10
  509.  
  510.  
  511.  
  512.                   ALPHA = 0.05      POWER = 0.80          K = 2
  513.                   F1 = 1            F2 = 2 * (N - 1)
  514.                   AVGESQ = 2        LAMBDA = 4 * N        N = 4
  515.  
  516.  
  517.         Example 3.2.2:
  518.  
  519.                   ALPHA = 0.025     POWER = 0.70          K = 3
  520.                   F1 = 2            F2 = 3 * (N - 1)
  521.                   AVGESQ = 1/3      LAMBDA = 1 * N        N = 11
  522.  
  523.  
  524.         Example 3.2.3:
  525.  
  526.                   ALPHA = 0.01      POWER = 0.975         K = 6
  527.                   F1 = 5            F2 = 6 * (N - 1)
  528.                   AVGESQ = 2/3      LAMBDA = 4 * N        N = 9
  529.  
  530.  
  531.  
  532.                             Two Factor Experiment
  533.               (Factor A -- "A" levels;  Factor B -- "B" levels)
  534.  
  535.         Main effects for Factor A:
  536.                   LAMBDA = N * B * SUM(EFF(I)**2) / EVAR
  537.                          = N * A * B * AVGESQ
  538.  
  539.         A * B interaction:
  540.                   LAMBDA = N * SUM(EFF(I)**2) / EVAR
  541.                          = N * A * B * AVGESQ
  542.            where EFF(i),i=1,...,A*B are the interaction terms.
  543.  
  544.  
  545.         Example 3.3.1:
  546.  
  547.            Main effects for A with interaction in model:
  548.  
  549.                   ALPHA = 0.05      POWER = 0.80          A = 3
  550.                   F1 = 2            F2 = 6 * (N - 1)      B = 2
  551.                   AVGESQ = 2/3      LAMBDA = 4 * N        N = 4
  552.  
  553.  
  554.            Main effects for A with no interaction in model:
  555.  
  556.                   ALPHA = 0.05      POWER = 0.80          A = 3
  557.                   F1 = 2            F2 = 6 * N - 4        B = 2
  558.  
  559.  
  560.         PC-SIZE                                           G.E. Dallal
  561.  
  562.  
  563.  
  564.                                                               PAGE 11
  565.  
  566.  
  567.                   AVGESQ = 2/3      LAMBDA = 4 * N        N = 4
  568.  
  569.  
  570.            Test for interaction (Use generic mode):
  571.  
  572.                   ALPHA = 0.05      POWER = 0.90          K = 6
  573.                   F1 = 2            F2 = 6 * (N - 1)
  574.                   AVGESQ = 1/2      LAMBDA = 3 * N        N = 5
  575.  
  576.  
  577.         Example 3.3.2:
  578.  
  579.            Main effects for A with interaction in model:
  580.  
  581.                   ALPHA = 0.005     POWER = 0.60          A = 4
  582.                   F1 = 3            F2 = 16 * (N - 1)     B = 4
  583.                   AVGESQ = 1        LAMBDA = 16 * N       N = 2
  584.  
  585.  
  586.            Main effects for A with no interaction in model:
  587.  
  588.                   ALPHA = 0.005     POWER = 0.60          A = 4
  589.                   F1 = 3            F2 = 16 * N - 7       B = 4
  590.                   AVGESQ = 1        LAMBDA = 16 * N       N = 2
  591.  
  592.  
  593.            Test for interaction (Use generic mode):
  594.  
  595.                   ALPHA = 0.10      POWER = 0.60          K = 16
  596.                   F1 = 9            F2 = 16 * (N - 1)
  597.                   AVGESQ = 1/8      LAMBDA = 2 * N        N = 5
  598.  
  599.  
  600.         Example 3.3.3:
  601.  
  602.            Main effects for A with interaction in model:
  603.  
  604.                   ALPHA = 0.01      POWER = 0.70          A = 2
  605.                   F1 = 1            F2 = 6 * (N - 1)      B = 3
  606.                   AVGESQ = 1        LAMBDA = 6 * N        N = 3
  607.  
  608.  
  609.            Main effects for A with no interaction in model:
  610.  
  611.                   ALPHA = 0.01      POWER = 0.70          A = 2
  612.                   F1 = 1            F2 = 6 * N - 4        B = 3
  613.                   AVGESQ = 1        LAMBDA = 6 * N        N = 3
  614.  
  615.  
  616.         PC-SIZE                                           G.E. Dallal
  617.  
  618.  
  619.  
  620.                                                               PAGE 12
  621.  
  622.  
  623.  
  624.  
  625.            Test for interaction (Use generic mode):
  626.  
  627.                   ALPHA = 0.001     POWER = 0.90          K = 6
  628.                   F1 = 2            F2 = 6 * (N - 1)
  629.                   AVGESQ = 1/2      LAMBDA = 3 * N        N = 10
  630.  
  631.  
  632.                            Randomized blocks designs
  633.                     (Single treatment factor at K levels)
  634.  
  635.                     LAMBDA = N * SUM(EFF(I)**2) / EVAR
  636.                     LAMBDA = N * K * AVGESQ
  637.  
  638.  
  639.         Example 3.4.1(i):
  640.  
  641.                   ALPHA = 0.05      POWER = 0.90          K = 3
  642.                   F1 = 2            F2 = 2 * (N - 1)
  643.                   AVGESQ = 2/3      LAMBDA = 2 * N        N = 8
  644.  
  645.  
  646.         Example 3.4.1(ii):  multiple treatment factors
  647.                                use generic mode
  648.  
  649.                   ALPHA = 0.05      POWER = 0.90          A = B = 3
  650.                   F1 = 2            F2 = 8 * (N - 1)
  651.                   AVGESQ = 2/3      LAMBDA = 6 * N        N = 3
  652.  
  653.  
  654.         Example 3.4.2:  multiple treatment factors
  655.                            use generic mode
  656.  
  657.                   ALPHA = 0.001     POWER = 0.95          A = B = 2
  658.                   F1 = 1            F2 = 12 * N - 2    K = 1,...,6*N
  659.                   AVGESQ = 1        LAMBDA = 24 * N       N = 2
  660.  
  661.  
  662.         Example 3.4.3:  multiple treatment factors
  663.                            use generic mode
  664.  
  665.                   ALPHA = 0.025     POWER = 0.70          A = 6
  666.                   F1 = 5            F2 = 17 * (N - 1)     B = 3
  667.                   AVGESQ = 1/3      LAMBDA = 6 * N        N = 3
  668.  
  669.  
  670.  
  671.  
  672.         PC-SIZE                                           G.E. Dallal
  673.  
  674.  
  675.  
  676.                                                               PAGE 13
  677.  
  678.  
  679.                         Regression using Generic Mode
  680.  
  681.                            Simple linear regression
  682.                            E(Y(i)) = C0 + C1 * X(i)
  683.             (N observations at each X(i), i=1,...,p, with mean 0)
  684.  
  685.                   LAMBDA = N * (C1**2 * SUM(X(I)**2)) / EVAR
  686.  
  687.  
  688.                              Quadratic regression
  689.                    E(Y(i)) = C0 + C1 * X(i) + C2 * X(i)**2
  690.  
  691.                                    LAMBDA=
  692.              N * (C1**2 * SUM(X(i)**2)+ 2 * C1 * C2* SUM(X(i)**3
  693.                         + C2**2 * SUM(X(i)**4) / EVAR
  694.  
  695.         Example 3.5.1 (linear):
  696.  
  697.                   ALPHA = 0.001     POWER = 0.995
  698.                   F1 = 1            F2 = 3 * N - 2
  699.                                     LAMBDA = 17 * N        N = 5
  700.  
  701.  
  702.         Example 3.5.1 (quadratic):  H0:  C1 = C2 = 0
  703.  
  704.                   ALPHA = 0.001     POWER = 0.995
  705.                   F1 = 2            F2 = 3 * (N - 1)
  706.                                     LAMBDA = 144 * N        N = 3
  707.  
  708.  
  709.         Example 3.5.1 (quadratic):  H0:  C2 = 0
  710.  
  711.                   ALPHA = 0.001     POWER = 0.995
  712.                   F1 = 1            F2 = 3 * (N - 1)
  713.                                     LAMBDA = 257 * N        N = 3
  714.  
  715.  
  716.         Example 3.5.2 (linear):
  717.  
  718.                   ALPHA = 0.025     POWER = 0.95
  719.                   F1 = 1            F2 = 6 * N - 2
  720.                                     LAMBDA = 1.150 * N      N = 14
  721.  
  722.         Example 3.5.2 (quadratic):  H0:  C2 = 0
  723.  
  724.                   ALPHA = 0.025     POWER = 0.95
  725.                   F1 = 1            F2 = 3 * (N - 1)
  726.  
  727.  
  728.         PC-SIZE                                           G.E. Dallal
  729.  
  730.  
  731.  
  732.                                                               PAGE 14
  733.  
  734.  
  735.                                     LAMBDA = .382 * N       N = 41
  736.  
  737.  
  738.                              Multivariate t-test
  739.  
  740.         Example 3.6.1  :
  741.  
  742.                   ALPHA = 0.10      POWER = 0.70
  743.                   F1 = 5            F2 = N - 5
  744.                                     LAMBDA = 1 * N          N = 14
  745.  
  746.  
  747.         Example 3.6.2:
  748.  
  749.                   ALPHA = 0.10      POWER = 0.995
  750.                   F1 = 4            F2 = 2 * N - 5
  751.                                     LAMBDA = .25 * N        N = 101
  752.  
  753.  
  754.  
  755.  
  756.  
  757.                                   ALGORITHMS
  758.  
  759.         PC-SIZE  makes  use  of  the  following  published  routines,
  760.         modified to run in double precision:
  761.  
  762.         Best, D.J.  and D.E. Roberts  (1975).  Algorithm  AS 91.  The
  763.            percentage  points of the chi-squared distribution.  Appl.
  764.            Statist.,24,385-388.
  765.  
  766.         Bhattacharjee, G.P.  (1970).  The  incomplete gamma integral.
  767.            Appl. Statist.,19,285-287.
  768.  
  769.         Cran,  G.W.,  K.J. Martin  and  G.E. Thomas  (1977).   Remark
  770.            AS R19  and  Algorithm  AS 109.  A remark on algorithms AS
  771.            63:  The incomplete beta integral,  and AS 64:  Inverse of
  772.            the     incomplete    beta    function    ratio.     Appl.
  773.            Statist.,26,111-114.
  774.  
  775.         Hill, I.D.  (1973).  Algorithm AS 66.  The normal integral.
  776.            Appl. Statist.,22,424-427.
  777.  
  778.         Majumder,  K.L.  and  G.P. Bhattacharjee  (1973).   Algorithm
  779.            AS 63.     The    incomplete    beta    integral.    Appl.
  780.            Statist.,22,409-411.
  781.  
  782.  
  783.  
  784.         PC-SIZE                                           G.E. Dallal
  785.  
  786.  
  787.  
  788.                                                               PAGE 15
  789.  
  790.  
  791.         Odeh,  R.E.  and  J.O. Evans  (1974).  Algorithm  AS 70.  The
  792.            percentage  points  of  the  normal  distribution.   Appl.
  793.            Statist.,23,96-97.
  794.  
  795.  
  796.         and the author's FORTRAN translation of
  797.  
  798.         Pike,  M.C.  and I.D. Hill (1966).  Algorithm 291.  Logarithm
  799.            of the gamma function.  Commun. Ass. Comput. Mach.,9,684.
  800.  
  801.  
  802.  
  803.  
  804.  
  805.                                   REFERENCES
  806.  
  807.         Fleiss, Joseph L.  (1981).  Statistical Methods for Rates and
  808.            Proportions, 2-nd ed.  New York: John Wiley & Sons, Inc.
  809.  
  810.         Graybill,  Franklin A.  (1961).  An  Introduction  to  Linear
  811.            Models, Vol, 1.  New York: McGraw-Hill Book Company, Inc.
  812.  
  813.         Kendall,  Maurice G.  and Alan Stuart  (1973).  The  Advanced
  814.            Theory of Statistics, Volume 2, 3-rd ed.  New York: Hafner
  815.            Publishing Co.
  816.  
  817.         Odeh,  Robert E.  and Martin Fox (1975).  Sample Size Choice:
  818.            Charts  for  Experiments  with  Linear  Models.  New York:
  819.            Marcel Dekker, Inc.
  820.  
  821.         Scheffe,  Henry (1959).  The Analysis of Variance.  New York:
  822.            John Wiley and Sons, Inc.
  823.  
  824.  
  825.  
  826.  
  827.  
  828.  
  829.  
  830.  
  831.  
  832.  
  833.  
  834.  
  835.  
  836.  
  837.  
  838.  
  839.  
  840.         PC-SIZE                                           G.E. Dallal
  841.  
  842.  
  843.  
  844.                                                               PAGE 16
  845.  
  846.  
  847.                     SAMPLE SIZE FOR THE TEST OF A NON-ZERO
  848.                            CORRELATION COEFFICIENT
  849.  
  850.                                  ALPHA = 0.05
  851.  
  852.                                      POWER
  853.  
  854.                     0.50    0.60    0.70    0.80    0.90    0.95
  855.             RHO:
  856.             0.05    1536    1959    2467    3137    4198    5192
  857.             0.10     384     489     616     782    1046    1293
  858.             0.20      96     122     153     193     258     319
  859.             0.30      43      54      67      84     112     138
  860.             0.40      24      30      37      46      61      75
  861.             0.50      15      19      23      29      37      46
  862.             0.60      11      13      15      19      24      30
  863.             0.70       8       9      11      13      17      20
  864.             0.80       6       7       8       9      11      13
  865.             0.90       5       5       6       6       8       9
  866.  
  867.  
  868.  
  869.                                  ALPHA = 0.01
  870.  
  871.                                      POWER
  872.  
  873.                     0.50    0.60    0.70    0.80    0.90    0.95
  874.             RHO:
  875.             0.05    2653    3199    3841    4667    5944    7116
  876.             0.10     662     798     958    1163    1481    1772
  877.             0.20     165     198     237     287     365     436
  878.             0.30      72      87     103     125     158     189
  879.             0.40      40      48      57      68      86     102
  880.             0.50      25      30      35      42      52      62
  881.             0.60      17      20      23      27      34      40
  882.             0.70      12      14      16      19      23      27
  883.             0.80       9      10      11      13      15      18
  884.             0.90       6       7       8       9      10      11
  885.  
  886.  
  887.  
  888.  
  889.  
  890.  
  891.  
  892.  
  893.  
  894.  
  895.  
  896.         PC-SIZE                                           G.E. Dallal
  897.