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.
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
Table 6 summarizes the valid result parameters for different analyses in the CUSTOM statement.
Table 6: Summary of Result Parameters in the CUSTOM Statement
This section summarizes the syntax for the common analyses that are supported in the CUSTOM statement.
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.
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.
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.
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.
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.