The POWER Procedure

CUSTOM Statement

  • CUSTOM <options>;

The CUSTOM statement performs power and sample size analyses for extensions of existing analyses that involve the chi-square, F, t, or normal distribution, or the distribution of the correlation coefficient under multivariate normality. The extensions consist of scalar multipliers and custom values for primary noncentrality and degrees of freedom. Important use cases include the following:

  • Wald and likelihood ratio tests in generalized linear models that have nominal, count, or ordinal responses

  • sample size inflation that is caused by correlated predictors

  • sample size deflation that is caused by correlation between the covariates and the response

Examples of generalized linear models include Poisson regression, logistic regression, and zero-inflated models. See Example 96.11 for an example that involves logistic regression.

Summary of Options

Table 4 summarizes the options available in the CUSTOM statement.

Table 4: CUSTOM Statement Options

Option Description
Define Analysis
DIST= Specifies the underlying distributional assumption
Specify Analysis Information
ALPHA= Specifies the significance level
MODELDF= Specifies the model degrees of freedom
SIDES= Specifies the number of sides and the direction of the statistical test
TESTDF= Specifies the test degrees of freedom
Specify Effects
CORR= Specifies the correlation
CRITMULT= Specifies the scalar multiplier of the critical value
PNCMULT= Specifies the scalar multiplier of the primary noncentrality
PRIMNC= Specifies the primary noncentrality
Specify Sample Size
NFRACTIONAL Enables fractional input and output for sample sizes
NTOTAL= Specifies the total sample size
Specify Power
POWER= Specifies the desired power
Control Ordering in Output
OUTPUTORDER= Controls the order of parameters


Table 5 shows which options apply to each distribution. Options not shown in the table apply to all distributions.

Table 5: Options That Can Be Used for Each Distribution in the CUSTOM Statement

DIST= Value
Option CHISQUARE CORR F NORMAL T
CORR bullet
CRITMULT bullet bullet
MODELDF bullet bullet bullet
PNCMULT bullet bullet bullet bullet
PRIMNC bullet bullet bullet bullet
SIDES bullet bullet bullet
TESTDF bullet bullet bullet


Table 6 summarizes the valid result parameters for different analyses in the CUSTOM statement.

Table 6: Summary of Result Parameters in the CUSTOM Statement

Solve For Syntax
Power POWER=.
Sample size NTOTAL=.


Dictionary of Options

ALPHA=number-list

specifies the level of significance of the statistical test. By default, ALPHA=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 partial correlation between p 1 greater-than-or-equal-to 1 variables in a set upper X 1 and a variable Y, adjusting for p minus p 1 variables in a (possibly empty) set upper X Subscript negative 1. This option is required for DIST=CORR and not allowed for any other value of the DIST= option. For information about specifying the number-list, see the section Specifying Value Lists in Analysis Statements.

CRITMULT=number-list

specifies a scalar multiplier of the critical value in the power computation formula, where values in number-list must be nonnegative. This option is allowed only for DIST=CHISQUARE and DIST=NORMAL. Values must be nonnegative. By default, CRITMULT=1. For information about specifying the number-list, see the section Specifying Value Lists in Analysis Statements.

DIST=CHISQUARE | CORR | F | NORMAL | T

specifies the underlying distribution assumed for the test statistic. You must specify one of the following values:

CHISQUARE

specifies the chi-square distribution.

CORR

specifies the distribution of the Pearson correlation coefficient under multivariate normality.

F

specifies the F distribution.

NORMAL

specifies the normal distribution.

T

specifies the t distribution.

MODELDF=number-list

specifies the model degrees of freedom. This option is required for DIST=CORR, DIST=F, and DIST=T, and it is not allowed for any other value of the DIST= option. For information about specifying the number-list, see the section Specifying Value Lists in Analysis Statements.

NFRACTIONAL
NFRAC

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

NTOTAL=number-list

specifies the sample size, or requests a solution for the sample size by specifying a missing value (NTOTAL=.). 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. You can specify the following values:

INTERNAL

arranges the parameters in the output according to the following order of their corresponding options:

SYNTAX

arranges the parameters in the output in the same order in which their corresponding options are specified in the CUSTOM statement.

REVERSE

arranges the parameters in the output in the reverse of the order in which their corresponding options are specified in the CUSTOM statement.

By default, OUTPUTORDER=INTERNAL.

PNCMULT=number-list

specifies a scalar multiplier of the primary noncentrality in the power computation formula, where values in number-list must be nonnegative This option is allowed only for DIST=CHISQUARE, DIST=F, DIST=NORMAL, and DIST=T. By default, PNCMULT=1. For information about specifying the number-list, see the section Specifying Value Lists in Analysis Statements.

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.

PRIMNC=number-list

specifies the primary noncentrality of the distribution of the test statistic. This option is allowed only for DIST=CHISQUARE, DIST=F, DIST=NORMAL, and DIST=T. Values in number-list must be nonnegative for DIST=CHISQUARE and DIST=F. For information about specifying the number-list, see the section Specifying Value Lists in Analysis Statements.

SIDES=keyword-list

specifies the number of sides (tails) and the direction of the statistical test. For information about specifying the keyword-list, see the section Specifying Value Lists in Analysis Statements. You can specify one or more of 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 an effect greater than the null value.

L

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

By default, SIDES=2.

TESTDF=number-list

specifies the test degrees of freedom. This option is allowed only for DIST=CHISQUARE, DIST=CORR, and DIST=F. TESTDF must be equal to 1 if DIST=CORR; SIDES=1, U, or L; and the TESTDF= option is specified. By default, TESTDF=1. For information about specifying the number-list, see the section Specifying Value Lists in Analysis Statements.

Option Groups for Common Analyses

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

Chi-Square Distribution

If you assume that the test statistic has a chi-square distribution, then you must specify the PRIMNC= option (primary noncentrality) and TESTDF= option (test degrees of freedom), as illustrated in the following statements:

proc power;
   custom
      dist   = chisquare
      primnc = 0.23
      testdf = 1
      ntotal = 30
      power  = .;
run;

The POWER=. option requests a solution for the power at a sample size of 30, as specified in the NTOTAL= option. You can also specify the CRITMULT= option to multiply the critical value in the power formula by a scalar or the PNCMULT= option to multiply the primary noncentrality by a scalar.

F Distribution

If you assume that the test statistic has an F distribution, then you must specify the PRIMNC= option (primary noncentrality), MODELDF= option (model degrees of freedom), and TESTDF= option (test degrees of freedom), as illustrated in the following statements:

proc power;
   custom
      dist   = f
      primnc = 0.04
      modeldf = 5
      testdf = 2
      ntotal = .
      power  = 0.9;
run;

The NTOTAL=. option requests a solution for the sample size that is required to achieve a power of at least 0.9, as specified in the POWER= option. You can also specify the PNCMULT= option to multiply the primary noncentrality by a scalar.

t Distribution

If you assume that the test statistic has a t distribution, then you must specify the PRIMNC= option (primary noncentrality) and MODELDF= option (model degrees of freedom), as illustrated in the following statements:

proc power;
   custom
      dist   = t
      primnc = 0.2
      modeldf = 2
      ntotal = 200
      power  = .;
run;

The POWER=. option requests a solution for the power at a sample size of 200, as specified in the NTOTAL= option. The default of SIDES=2 specifies a two-sided test. You can also specify the PNCMULT= option to multiply the primary noncentrality by a scalar.

Normal Distribution

If you assume that the test statistic has a normal distribution, then you must specify the PRIMNC= option (primary noncentrality), as illustrated in the following statements:

proc power;
   custom
      dist   = normal
      primnc = 0.2
      ntotal = .
      power  = 0.9;
run;

The NTOTAL=. option requests a solution for the sample size that is required to achieve a power of at least 0.9, as specified in the POWER= option. The default of SIDES=2 specifies a two-sided test. You can also specify the CRITMULT= option to multiply the critical value in the power formula by a scalar or the PNCMULT= option to multiply the primary noncentrality by a scalar.

Distribution of the Correlation Coefficient under Multivariate Normality

If you plan to use the Pearson correlation coefficient in your data analysis and you assume that the data have a multivariate normal distribution, then you must specify the CORR= option (partial correlation), MODELDF= option (model degrees of freedom), and TESTDF= option (test degrees of freedom), as illustrated in the following statements:

proc power;
   custom
      dist    = corr
      corr    = 0.3
      modeldf = 3
      testdf = 1
      ntotal  = 130
      power   = .;
run;

The POWER=. option requests a solution for the power at a sample size of 130, as specified in the NTOTAL= option. The default of SIDES=2 specifies a two-sided test.

Last updated: December 09, 2022