SCORRELATION procedure

Calculates the sample size to detect specified correlations (R.W. Payne).


Options

PRINT = string
What to print (replication, power); default repl, powe

PROBABILITY = scalar
Significance level at which the correlation or difference between correlations is to be tested; default 0.05

POWER = scalar
The required power (i.e. probability of detection) of the test; default 0.9

TMETHOD = string
Whether to a one- or two-sided test is to be made (onesided, twosided); default ones

RATIOREPLICATION = scalar
Ratio of replication sample2:sample1 (i.e. the size of sample for group 2 should be RATIOREPLICATION times the size of sample for group 1); default 1

REPLICATION = variate
Replication values for which to calculate and print or save the power; default * takes 11 replication values centred around the required number of replicates


Parameters

COR1 = scalars
Anticipated correlation in group 1

COR2 = scalars
Anticipated correlation in group 2

NREPLICATES = scalars
Saves the required number of replicates

VREPLICATION = variates
Numbers of replicates for which powers have been calculated

VPOWER = variates
Power (i.e. probability of detection) for the various numbers of replicates


Description

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 COR1 and 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).

   The PRINT option controls printed output, with settings:

    replication
to print the required number of replicates in each sample (i.e. the size of each sample);

    power
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 VREPLICATION and 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.

 

Options: PRINT, PROBABILITY, POWER, TMETHOD, RATIOREPLICATION, REPLICATION.

Parameters: COR1, COR2, NREPLICATES, VREPLICATION, VPOWER.


Method

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).