Calculates the sample size to detect specified correlations (R.W. Payne).
|What to print (
||Significance level at which the correlation or difference between correlations is to be tested; default 0.05|
||The required power (i.e. probability of detection) of the test; default 0.9|
||Whether to a one- or two-sided test is to be made (
||Ratio of replication sample2:sample1 (i.e. the size of sample for group 2 should be
||Replication values for which to calculate and print or save the power; default * takes 11 replication values centred around the required number of replicates|
||Anticipated correlation in group 1|
||Anticipated correlation in group 2|
||Saves the required number of replicates|
||Numbers of replicates for which powers have been calculated|
||Power (i.e. probability of detection) for the various numbers of replicates|
SCORRELATION may be useful when you wish to assess the correlation between two variables within a single group of subjects, or when you wish to compare the correlations between two groups of subjects. The correlation in this case is the product moment correlation coefficient, as calculated by the
CORRELATION function (and so the variables are assumed to have Normal distributions).
If there is a single group of subjects the correlation is specified (in a scalar) by the
COR1 parameter, and the assumption is that we wish to assess whether this is non-zero. With two groups the correlations are specified by the
COR2 parameters (again in scalars). Generally equal sample sizes are assumed for the two groups. However, you can set the
RATIOREPLICATION option to a scalar,
R say, to indicate that the size of the second sample should be
R times the size of the first sample. The
NREPLICATES parameter allows you to save the required size of the first sample.
The significance level for the test is specified by the
PROBABILITY option (default 0.05 i.e. 5%). By default this is for a one-sided test, but you can set option
TMETHOD=twosided for a two-sided test. The required probabilty for detection of the correlation or difference in correlations (that is, the power of the test) is specified by the
POWER option (default 0.9).
||to print the required number of replicates in each sample (i.e. the size of each sample);|
||to print a table giving the power (i.e. probability of detection) provided by a range of numbers of replicates.|
By default both are printed.
The replications and corresponding powers can also be saved, in variates, using the
VPOWER parameters. The
REPLICATION option can specify the replication values for which to calculate and print or save the power; if this is not set, the default is to take 11 replication values centred around the required number of replicates.
With a single group, suppose that the sample correlation is r and the number of subjects is n.
SCORRELATION uses the fact that, under the null hypothesis of a zero correlation, the variable
t = r × √((n – 2) / (1 – r2))
has a t distribution on n-2 degrees of freedom.
With two groups,
SCORRELATION uses Fisher’s Z transformation:
z = 0.5 × log((1 + r)/( 1 – r))
Provided the sample sizes are reasonably large, z can be assumed to have a Normal distribution with variance 1/(n-3).
Commands for: Design of experiments.
CAPTION 'SCORRELATION example',\ '1) one sample, anticipated correlation 0.5.'; STYLE=meta,plain SCORRELATION [PRINT=replication,power; TMETHOD=twosided] 0.5 CAPTION '2) two samples, anticipated correlations 0.2 and 0.6.' SCORRELATION [PRINT=replication,power; TMETHOD=twosided] 0.2; COR2=0.6