The POWER Procedure

ONECORR Statement

  • ONECORR <options>;

The ONECORR statement performs power and sample size analyses for tests of simple and partial Pearson correlation between two variables. Both Fisher’s z test and the t test are supported.

Summary of Options

Table 11 summarizes the options available in the ONECORR statement.

Table 11: ONECORR Statement Options

Option Description
Define Analysis
DIST= Specifies the underlying distribution assumed for the test statistic
TEST= Specifies the statistical analysis
Specify Analysis Information
ALPHA= Specifies the significance level
MODEL= Specifies the assumed distribution of the variables
NPARTIALVARS= Specifies the number of variables adjusted for in the correlation
NULLCORR= Specifies the null value of the correlation
SIDES= Specifies the number of sides and the direction of the statistical test
Specify Effects
CORR= Specifies the correlation
Specify Sample Size
NFRACTIONAL Enables fractional input and output for sample sizes
NTOTAL= Specifies the sample size
Specify Power
POWER= Specifies the desired power of the test
Control Ordering in Output
OUTPUTORDER= Controls the output order of parameters


Table 12 summarizes the valid result parameters in the ONECORR statement.

Table 12: Summary of Result Parameters in the ONECORR Statement

Analyses Solve For Syntax
TEST=PEARSON Power POWER=.
Sample size NTOTAL=.


Dictionary of Options

ALPHA=number-list

specifies the level of significance of the statistical test. The default is 0.05, which corresponds to the usual 0.05 times 100% = 5% level of significance. For information about specifying the number-list, see the section Specifying Value Lists in Analysis Statements.

CORR=number-list

specifies the correlation between two variables, possibly adjusting for other variables as determined by the NPARTIALVARS= option. For information about specifying the number-list, see the section Specifying Value Lists in Analysis Statements.

DIST=FISHERZ | T

specifies the underlying distribution assumed for the test statistic. FISHERZ corresponds to Fisher’s z normalizing transformation of the correlation coefficient. T corresponds to the t transformation of the correlation coefficient. Note that DIST=T is equivalent to analyses in the MULTREG statement with NTESTPREDICTORS=1. The default value is FISHERZ.

MODEL=keyword-list

specifies the assumed distribution of the first variable when DIST=T. The second variable is assumed to have a normal distribution. MODEL=FIXED indicates a fixed distribution. MODEL=RANDOM (the default) indicates a joint bivariate normal distribution with the second variable. You can use the aliases CONDITIONAL for FIXED and UNCONDITIONAL for RANDOM. This option can be used only for DIST=T. For information about specifying the keyword-list, see the section Specifying Value Lists in Analysis Statements.

FIXED

fixed variables

RANDOM

random (bivariate normal) variables

NFRACTIONAL
NFRAC

enables fractional input and output for sample sizes. See the section Sample Size Adjustment Options for information about the ramifications of the presence (and absence) of the NFRACTIONAL option.

NPARTIALVARS=number-list
NPVARS=number-list

specifies the number of variables adjusted for in the correlation between the two primary variables. The default value is 0, which corresponds to a simple correlation. For information about specifying the number-list, see the section Specifying Value Lists in Analysis Statements.

NTOTAL=number-list

specifies the sample size or requests a solution for the sample size by specifying a missing value (NTOTAL=.). Values for the sample size must be at least p + 3 when DIST=T and MODEL=CONDITIONAL, and at least p + 4 when either DIST=FISHER or when DIST=T and MODEL=UNCONDITIONAL, where p is the value of the NPARTIALVARS option. For information about specifying the number-list, see the section Specifying Value Lists in Analysis Statements.

NULLCORR=number-list
NULLC=number-list

specifies the null value of the correlation. The default value is 0. This option can be used only with the DIST=FISHERZ analysis. For information about specifying the number-list, see the section Specifying Value Lists in Analysis Statements.

OUTPUTORDER=INTERNAL | REVERSE | SYNTAX

controls how the input and default analysis parameters are ordered in the output. OUTPUTORDER=INTERNAL (the default) arranges the parameters in the output according to the following order of their corresponding options:

The OUTPUTORDER=SYNTAX option arranges the parameters in the output in the same order in which their corresponding options are specified in the ONECORR statement. The OUTPUTORDER=REVERSE option arranges the parameters in the output in the reverse of the order in which their corresponding options are specified in the ONECORR statement.

POWER=number-list

specifies the desired power of the test or requests a solution for the power by specifying a missing value (POWER=.). The power is expressed as a probability, a number between 0 and 1, rather than as a percentage. For information about specifying the number-list, see the section Specifying Value Lists in Analysis Statements.

SIDES=keyword-list

specifies the number of sides (or tails) and the direction of the statistical test. You can specify the following keywords:

1

specifies a one-sided test, with the alternative hypothesis in the same direction as the effect.

2

specifies a two-sided test.

U

specifies an upper one-sided test, with the alternative hypothesis indicating a correlation greater than the null value.

L

specifies a lower one-sided test, with the alternative hypothesis indicating a correlation less than the null value.

By default, SIDES=2.

TEST=PEARSON

specifies a test of the Pearson correlation coefficient between two variables, possibly adjusting for other variables. This is the default test option.

Option Groups for Common Analyses

This section summarizes the syntax for the common analyses that are supported in the ONECORR statement.

Fisher’s z Test for Pearson Correlation

The following statements demonstrate a power computation for Fisher’s z test for correlation. Default values of TEST=PEARSON, ALPHA=0.05, SIDES=2, and NPARTIALVARS=0 are assumed.

proc power;
   onecorr dist=fisherz
      nullcorr = 0.15
      corr = 0.35
      ntotal = 180
      power = .;
run;
t Test for Pearson Correlation

The following statements demonstrate a sample size computation for the t test for correlation. Default values of TEST=PEARSON, MODEL=RANDOM, ALPHA=0.05, and SIDES=2 are assumed.

proc power;
   onecorr dist=t
      npartialvars = 4
      corr = 0.45
      ntotal = .
      power = 0.85;
run;
Last updated: December 09, 2022