Calculates the minimum size of effect or contrast detectable in an analysis of variance (R.W. Payne).
Options
PRINT = string token |
Prints the minimum size of response that can be detected (detected ); default dete |
---|---|
TERM = formula |
Treatment term to be assessed in the analysis |
TREATMENTSTRUCTURE = formula |
Treatment structure of the design; determined automatically from an ANOVA save structure if TREATMENTSTRUCTURE is unset or if SAVE is set |
BLOCKSTRUCTURE = formula |
Block structure of the design; determined automatically from an ANOVA save structure if BLOCKSTRUCTURE is unset or if SAVE is set |
FACTORIAL = scalar |
Limit on the number of factors in treatment terms; default 3 |
PROBABILITY = scalar |
Significance level at which the response is required to be detected (assuming a one-sided test); default 0.05 |
TMETHOD = string token |
Type of test to be made (onesided , twosided , equivalence , noninferiority ); default ones |
XCONTRASTS = variate |
X-variate defining a contrast to be detected |
CONTRASTTYPE = string token |
Type of contrast (regression , comparison ); default rege |
TOLERANCE = scalar |
Tolerance for the iterations to calculate the detectable response |
SAVE = ANOVA save structure |
Save structure to provide the information about the design |
Parameters
POWER = scalars or variates |
Specifies the power i.e. probability with which the response should be detected |
---|---|
RMS = scalars |
Anticipated residual mean square corresponding to TERM ; can be omitted if a SAVE structure is available |
DETECTED = scalars or variates |
Minimum size of difference or contrast between the effects of TERM that is to be detected |
Description
ADETECTION
finds the minimum size of effect or contrast that is detectable with a specified power (or probability) in an analysis of variance. The treatment term to test is specified using the TERM
option of ADETECTION
, and the power with which you want to detect it is given by the POWER
parameter. You can save the size of response using the DETECTED
parameter. This is printed by default, but you can set option PRINT=*
to stop this.
As an alternative to detecting a difference between treatment effects, you can ask to detect a contrast. However, here the treatment term must be a main effect (that is, TERM
must involve just one factor). The XCONTRASTS
option then species a variate containing the coefficients defining the contrast, and the CONTRASTTYPE
option indicates whether this is a regression contrast (as specified by the REG
function) or a comparison (as specified by COMPARISON
).
The PROBABILITY
option specifies the significance level that you will be using in the analysis to detect the treatment difference or contrast; the default is 0.05, i.e. 5%. By default, ADETECTION
assumes that a one-sided t-test is to be used, but you can set option TMETHOD=twosided
to take a two-sided t-test instead.
Other settings of TMETHOD
enable you to test for equivalence or for non-inferiority. With equivalence (TMETHOD=equivalence
), DETECTED
defines a threshold below which the treatments can be assumed to be equivalent. If the treatments have effects e1 and e2, the null hypothesis that the treatments are not equivalent is that either
(e1 – e2) ≤ –DETECTED
or
(e1 – e2) ≥ DETECTED
with the alternative hypothesis that they are equivalent, i.e.
–DETECTED
< (e1 – e2) < DETECTED
(For further details see the Method information for procedure ASAMPLESIZE
.) With non-inferiority (TMETHOD=noninferiority
), DETECTED
again specifies the threshold for the effect of one treatment to be superior to another. So, for example, to demonstrate non-inferiority of treatment 1 compared to treatment 2, the null hypothesis becomes
(e1 – e2) ≥ –DETECTED
which represents a simple one-sided t-test.
ADETECTION
needs to know the design, and the size of residual mean square anticipated for the stratum where the treatment term is estimated. This is provided most easily by supplying the analysis of a design with similar units and the same block and treatment structures as those that are to be used in the new design. To do this, you should analyse the earlier set of data with the ANOVA
directive in the usual way. First define the strata (or error terms) for the design using the BLOCKSTRUCTURE
directive, and the treatment model to be fitted using the TREATMENTSTRUCTURE
directive. Then analyse the y-variate using the ANOVA
directive. Provided you do not give any other ANOVA
commands in the interim, ADETECTION
will pick up the information automatically from the save information held within Genstat about the most recent ANOVA
analysis. Alternatively, you can save the information explicitly in an ANOVA
save structure, using the SAVE
parameter of ANOVA
, and then use this same save structure as the setting of the SAVE
option of ADETECTION
.
If you do not have a suitable earlier set of data, you should set up the design factors to contain the values required to define the units of the design. Then use the BLOCKSTRUCTURE
and TREATMENTSTRUCTURE
options of ADETECTION
to define the strata and the treatment model, and the RMS
option to specify the anticipated residual mean square for the stratum where TERM
is estimated. There is also the compromise possibility that you can take the information about the design, the strata and treatment model from an ANOVA
save structure (generated for example by the analysis of an artificial data set), but use the RMS
parameter to specify a different residual mean square from the one in the analysis in the save structure. The treatment terms to be included are controlled by the FACTORIAL
option; this sets a limit (by default 3) on the number of factors in a treatment term: terms containing more than that number are deleted.
The procedure involves an iterative search to find the response that gives the specified power. The TOLERANCE
option sets the convergence criterion (on the probability scale); the default is 10-7.
Options: PRINT
, TERM
, TREATMENTSTRUCTURE
, BLOCKSTRUCTURE
, FACTORIAL
, PROBABILITY
, TMETHOD
, XCONTRASTS
, CONTRASTTYPE
, TOLERANCE
, SAVE
.
Parameters: POWER
, RMS
, DETECTED
.
Method
The standard error of difference between two treatment effects is
√( s2 × 2 / (r × e))
where s2 is the stratum variance of the stratum where the treatment term is estimated, e is the efficiency factor, and r is the replication of each effect. For a regression contrast the standard error is
√( s2 × 2 / (r × sdiv × e))
where sdiv is the sum of squares of the XCONTRASTS
variate, and for a comparison contrast the standard error is
√( s2 × sdiv / (r × e))
ADETECTION
assumes that the treatment effects have equal replication. Unequal replication can be studied by defining a comparison between the effects. For example, to allow for a control level with two replicates, you could assume that the first two levels are for the control, and then study comparisons between their mean and the other levels.
See also
Directive: ANOVA
.
Procedures: APOWER
, ASAMPLESIZE
.
Commands for: Design of experiments, Analysis of variance.
Example
CAPTION 'ADETECTION example',!t('Split plot design',\ '(Yates,F: The Design and Analysis of Factorial Experiments,',\ 'Commonwealth Bureau of Soils, Tech. Comm. 35, p.74)');\ STYLE=meta,plain FACTOR [NVALUES=72; LEVELS=6] Block & [LEVELS=3] Wplot & [LEVELS=4] Subplot GENERATE Block,Wplot,Subplot FACTOR [NVAL=72; LABELS=!T('0 cwt','0.2 cwt','0.4 cwt','0.6 cwt')] Nitrogen & [NVAL=72; LABELS=!T(Victory,'Golden rain',Marvellous)] Variety READ [SERIAL=yes] Nitrogen,Variety 4 3 2 1 1 2 4 3 1 2 3 4 3 1 2 4 4 1 2 3 2 1 3 4 2 3 4 1 4 2 3 1 1 4 2 3 3 4 1 2 1 3 4 2 2 3 4 1 4 1 3 2 3 4 1 2 3 4 2 1 3 1 4 2 4 3 1 2 1 2 3 4 : 3 3 3 3 1 1 1 1 2 2 2 2 3 3 3 3 1 1 1 1 2 2 2 2 2 2 2 2 3 3 3 3 1 1 1 1 3 3 3 3 2 2 2 2 1 1 1 1 2 2 2 2 1 1 1 1 3 3 3 3 1 1 1 1 2 2 2 2 3 3 3 3 : VARIATE [NVALUES=72] Yield READ Yield 156 118 140 105 111 130 174 157 117 114 161 141 104 70 89 117 122 74 89 81 103 64 132 133 108 126 149 70 144 124 121 96 61 100 91 97 109 99 63 70 80 94 126 82 90 100 116 62 96 60 89 102 112 86 68 64 132 124 129 89 118 53 113 74 104 86 89 82 97 99 119 121 : MATRIX [ROWS=!t('Victory & Golden rain versus Marvellous'); COLUMNS=3;\ VALUES=1,1,-2] Vcomp VARIATE [VALUES=0,0.2...0.6] Nreg BLOCKSTRUCTURE Block/Wplot/Subplot TREATMENTSTRUCTURE COMPARISON(Variety;1;Vcomp) * POL(Nitrogen;1;Nreg) ANOVA [PRINT=aov,contrasts,means; FPROBABILITY=yes] Yield; SAVE=savesp VARIATE [VALUES=0.8,0.85,0.9] powers ADETECTION [PRINT=detected; TERM=Variety] powers; RMS=600 ADETECTION [PRINT=detected; TERM=Nitrogen] powers; RMS=200 ADETECTION [PRINT=detected; TERM=Variety; XCONTRASTS=!(#Vcomp);\ CONTRASTTYPE=comparison] powers ADETECTION [PRINT=detected; TERM=Nitrogen; XCONTRASTS=Nreg;\ CONTRASTTYPE=regression] powers