The FREQ Procedure

Binomial Proportion

If you specify the BINOMIAL option in the TABLES statement, PROC FREQ computes the binomial proportion for one-way tables. By default, this is the proportion of observations in the first variable level that appears in the output. (You can use the LEVEL= option to specify a different level for the proportion.) The binomial proportion is computed as

ModifyingAbove p With caret equals n 1 slash n

where n 1 is the frequency of the first (or designated) level and n is the total frequency of the one-way table. The standard error of the binomial proportion is computed as

normal s normal e left-parenthesis ModifyingAbove p With caret right-parenthesis equals StartRoot ModifyingAbove p With caret left-parenthesis 1 minus ModifyingAbove p With caret right-parenthesis slash n EndRoot
Binomial Confidence Limits

PROC FREQ provides Wald and exact (Clopper-Pearson) confidence limits for the binomial proportion. You can also request the following binomial confidence limit types by specifying the BINOMIAL(CL=) option: Agresti-Coull, Blaker, Jeffreys, exact mid-p, likelihood ratio, logit, and Wilson (score). For more information, see Brown, Cai, and DasGupta (2001), Agresti and Coull (1998), and Newcombe (1998b), in addition to the references cited for each confidence limit type.

Wald Confidence Limits

Wald asymptotic confidence limits are based on the normal approximation to the binomial distribution. PROC FREQ computes the Wald confidence limits for the binomial proportion as

ModifyingAbove p With caret plus-or-minus left-parenthesis z Subscript alpha slash 2 Baseline times normal s normal e left-parenthesis ModifyingAbove p With caret right-parenthesis right-parenthesis

where z Subscript alpha slash 2 is the 100 left-parenthesis 1 minus alpha slash 2 right-parenthesisth percentile of the standard normal distribution. The confidence level alpha is determined by the ALPHA= option; by default, ALPHA=0.05, which produces 95% confidence limits.

If you specify CL=WALD(CORRECT) or the CORRECT binomial-option, PROC FREQ includes a continuity correction of 1 slash 2 n in the Wald asymptotic confidence limits. The purpose of this correction is to adjust for the difference between the normal approximation and the discrete binomial distribution. See Fleiss, Levin, and Paik (2003) for more information. The continuity-corrected Wald confidence limits for the binomial proportion are computed as

ModifyingAbove p With caret plus-or-minus left-parenthesis z Subscript alpha slash 2 Baseline times normal s normal e left-parenthesis ModifyingAbove p With caret right-parenthesis plus left-parenthesis 1 slash 2 n right-parenthesis right-parenthesis
Exact (Clopper-Pearson) Confidence Limits

Exact (Clopper-Pearson) confidence limits for the binomial proportion are constructed by inverting the equal-tailed test based on the binomial distribution. This method is attributed to Clopper and Pearson (1934). The exact confidence limits upper P Subscript upper L and upper P Subscript upper U satisfy the following equations, for n 1 equals 1 comma 2 comma ellipsis n minus 1:

StartLayout 1st Row 1st Column sigma-summation Underscript x equals n 1 Overscript n Endscripts StartBinomialOrMatrix n Choose x EndBinomialOrMatrix upper P Subscript upper L Superscript x Baseline left-parenthesis 1 minus upper P Subscript upper L Baseline right-parenthesis Superscript n minus x 2nd Column equals 3rd Column alpha slash 2 2nd Row 1st Column sigma-summation Underscript x equals 0 Overscript n 1 Endscripts StartBinomialOrMatrix n Choose x EndBinomialOrMatrix upper P Subscript upper U Superscript x Baseline left-parenthesis 1 minus upper P Subscript upper U Baseline right-parenthesis Superscript n minus x 2nd Column equals 3rd Column alpha slash 2 EndLayout

The lower confidence limit is 0 when n 1 equals 0, and the upper confidence limit is 1 when n 1 equals n.

PROC FREQ computes the exact (Clopper-Pearson) confidence limits by using the F distribution as

upper P Subscript upper L Baseline equals left-parenthesis 1 plus StartFraction n minus n 1 plus 1 Over n 1 upper F left-parenthesis alpha slash 2 comma 2 n 1 comma 2 left-parenthesis n minus n 1 plus 1 right-parenthesis right-parenthesis EndFraction right-parenthesis Superscript negative 1
upper P Subscript upper U Baseline equals left-parenthesis 1 plus StartFraction n minus n 1 Over left-parenthesis n 1 plus 1 right-parenthesis upper F left-parenthesis 1 minus alpha slash 2 comma 2 left-parenthesis n 1 plus 1 right-parenthesis comma 2 left-parenthesis n minus n 1 right-parenthesis right-parenthesis EndFraction right-parenthesis Superscript negative 1

where upper F left-parenthesis alpha slash 2 comma b comma c right-parenthesis is the (alpha slash 2)th percentile of the F distribution with b and c degrees of freedom. See Leemis and Trivedi (1996) for a derivation of this expression. Also see Collett (1991) for more information about exact binomial confidence limits.

Because this is a discrete problem, the confidence coefficient (coverage probability) of the exact (Clopper-Pearson) interval is not exactly left-parenthesis 1 minus alpha right-parenthesis but is at least left-parenthesis 1 minus alpha right-parenthesis. Thus, this confidence interval is conservative. Unless the sample size is large, the actual coverage probability can be much larger than the target value. For more information about the performance of these confidence limits, see Agresti and Coull (1998), Brown, Cai, and DasGupta (2001), and Leemis and Trivedi (1996).

Agresti-Coull Confidence Limits

If you specify the CL=AGRESTICOULL binomial-option, PROC FREQ computes Agresti-Coull confidence limits for the binomial proportion as

p overTilde plus-or-minus left-parenthesis z Subscript alpha slash 2 Baseline times StartRoot p overTilde left-parenthesis 1 minus p overTilde right-parenthesis slash n overTilde EndRoot right-parenthesis

where

StartLayout 1st Row 1st Column n overTilde Subscript 1 2nd Column equals 3rd Column n 1 plus z Subscript alpha slash 2 Superscript 2 slash 2 2nd Row 1st Column n overTilde 2nd Column equals 3rd Column n plus z Subscript alpha slash 2 Superscript 2 3rd Row 1st Column p overTilde 2nd Column equals 3rd Column n overTilde Subscript 1 Baseline slash n overTilde EndLayout

The Agresti-Coull confidence interval has the same general form as the standard Wald interval but uses p overTilde in place of ModifyingAbove p With caret. For alpha equals 0.05, the value of z Subscript alpha slash 2 is close to 2, and this interval is the "add 2 successes and 2 failures" adjusted Wald interval of Agresti and Coull (1998).

Blaker Confidence Limits

If you specify the CL=BLAKER binomial-option, PROC FREQ computes Blaker confidence limits for the binomial proportion, which are constructed by inverting the two-sided exact Blaker test (Blaker 2000). The 100 left-parenthesis 1 minus alpha right-parenthesis% Blaker confidence interval consists of all values of the proportion p italic 0 for which the test statistic upper B left-parenthesis p italic 0 comma n 1 right-parenthesis falls in the acceptance region,

StartSet p italic 0 colon upper B left-parenthesis p italic 0 comma n 1 right-parenthesis greater-than alpha EndSet

where

upper B left-parenthesis p italic 0 comma n 1 right-parenthesis equals normal upper P normal r normal o normal b left-parenthesis gamma left-parenthesis p italic 0 comma upper X right-parenthesis less-than-or-equal-to gamma left-parenthesis p italic 0 comma n 1 right-parenthesis vertical-bar p italic 0 right-parenthesis
gamma left-parenthesis p italic 0 comma n 1 right-parenthesis equals min left-parenthesis normal upper P normal r normal o normal b left-parenthesis upper X greater-than-or-equal-to n 1 vertical-bar p italic 0 right-parenthesis comma normal upper P normal r normal o normal b left-parenthesis upper X less-than-or-equal-to n 1 vertical-bar p italic 0 right-parenthesis right-parenthesis

and X is a binomial random variable. For more information, see Blaker (2000).

Jeffreys Confidence Limits

If you specify the CL=JEFFREYS binomial-option, PROC FREQ computes Jeffreys confidence limits for the binomial proportion as

left-parenthesis beta left-parenthesis alpha slash 2 comma n 1 plus 1 slash 2 comma n minus n 1 plus 1 slash 2 right-parenthesis comma beta left-parenthesis 1 minus alpha slash 2 comma n 1 plus 1 slash 2 comma n minus n 1 plus 1 slash 2 right-parenthesis right-parenthesis

where beta left-parenthesis alpha comma b comma c right-parenthesis is the alphath percentile of the beta distribution with shape parameters b and c. The lower confidence limit is set to 0 when n 1 equals 0, and the upper confidence limit is set to 1 when n 1 equals n. This is an equal-tailed interval based on the noninformative Jeffreys prior for a binomial proportion. For more information, see Brown, Cai, and DasGupta (2001). For information about using beta priors for inference on the binomial proportion, see Berger (1985).

When you specify CL=JEFFREYS(MODIFY), the procedure provides modified Jeffreys confidence limits (Brown, Cai, and DasGupta 2001, p. 113) to improve the coverage of the confidence limits for proportions near 0 or 1. When n 1 equals 0, the modified version replaces the upper confidence limit with p Subscript l Baseline equals 1 minus left-parenthesis alpha slash 2 right-parenthesis Superscript 1 slash n. When n 1 equals n, the modified version replaces the lower confidence limit with 1 minus p Subscript l. The modified version also sets the lower confidence limit to 0 when n 1 equals 1 and sets the upper confidence limit to 1 when n 1 equals n minus 1. Otherwise (when 1 less-than n 1 less-than n minus 1), the Jeffreys confidence limits are not modified.

Likelihood Ratio Confidence Limits

If you specify the CL=LIKELIHOODRATIO binomial-option, PROC FREQ computes likelihood ratio confidence limits for the binomial proportion by inverting the likelihood ratio test. The likelihood ratio test statistic for the null hypothesis that the proportion equals p italic 0 can be expressed as

upper L left-parenthesis p italic 0 right-parenthesis equals minus 2 left-parenthesis n 1 log left-parenthesis ModifyingAbove p With caret slash p italic 0 right-parenthesis plus left-parenthesis n minus n 1 right-parenthesis log left-parenthesis left-parenthesis 1 minus ModifyingAbove p With caret right-parenthesis slash left-parenthesis 1 minus p italic 0 right-parenthesis right-parenthesis right-parenthesis

The 100 left-parenthesis 1 minus alpha right-parenthesis% likelihood ratio confidence interval consists of all values of p italic 0 for which the test statistic upper L left-parenthesis p italic 0 right-parenthesis falls in the acceptance region,

StartSet p italic 0 colon upper L left-parenthesis p italic 0 right-parenthesis less-than chi Subscript 1 comma alpha Superscript 2 Baseline EndSet

where chi Subscript 1 comma alpha Superscript 2 is the 100left-parenthesis 1 minus alpha right-parenthesisth percentile of the chi-square distribution with 1 degree of freedom. PROC FREQ finds the confidence limits by iterative computation. For more information, see Fleiss, Levin, and Paik (2003), Brown, Cai, and DasGupta (2001), Agresti (2013), and Newcombe (1998b).

Logit Confidence Limits

If you specify the CL=LOGIT binomial-option, PROC FREQ computes logit confidence limits for the binomial proportion, which are based on the logit transformation upper Y equals log left-parenthesis ModifyingAbove p With caret slash left-parenthesis 1 minus ModifyingAbove p With caret right-parenthesis right-parenthesis. Approximate confidence limits for Y are computed as

upper Y Subscript upper L Baseline equals log left-parenthesis ModifyingAbove p With caret slash left-parenthesis 1 minus ModifyingAbove p With caret right-parenthesis right-parenthesis minus z Subscript alpha slash 2 Baseline StartRoot n slash left-parenthesis n 1 left-parenthesis n minus n 1 right-parenthesis right-parenthesis EndRoot
upper Y Subscript upper U Baseline equals log left-parenthesis ModifyingAbove p With caret slash left-parenthesis 1 minus ModifyingAbove p With caret right-parenthesis right-parenthesis plus z Subscript alpha slash 2 Baseline StartRoot n slash left-parenthesis n 1 left-parenthesis n minus n 1 right-parenthesis right-parenthesis EndRoot

The confidence limits for Y are inverted to produce 100 left-parenthesis 1 minus alpha right-parenthesis% logit confidence limits upper P Subscript upper L and upper P Subscript upper U for the binomial proportion p as

upper P Subscript upper L Baseline equals exp left-parenthesis upper Y Subscript upper L Baseline slash left-parenthesis 1 plus exp left-parenthesis upper Y Subscript upper L Baseline right-parenthesis right-parenthesis
upper P Subscript upper U Baseline equals exp left-parenthesis upper Y Subscript upper U Baseline slash left-parenthesis 1 plus exp left-parenthesis upper Y Subscript upper U Baseline right-parenthesis right-parenthesis

For more information, see Brown, Cai, and DasGupta (2001) and Korn and Graubard (1998).

Mid-p Confidence Limits

If you specify the CL=MIDP binomial-option, PROC FREQ computes exact mid-p confidence limits for the binomial proportion by inverting two one-sided binomial tests that include mid-p tail areas. The mid-p approach replaces the probability of the observed frequency with half of that probability in the Clopper-Pearson sum, which is described in the section Exact (Clopper-Pearson) Confidence Limits. The exact mid-p confidence limits upper P Subscript upper L and upper P Subscript upper U are the solutions to the equations

StartLayout 1st Row 1st Column sigma-summation Underscript x equals n 1 plus 1 Overscript n Endscripts StartBinomialOrMatrix n Choose x EndBinomialOrMatrix upper P Subscript upper L Superscript x Baseline left-parenthesis 1 minus upper P Subscript upper L Baseline right-parenthesis Superscript n minus x Baseline plus one-half StartBinomialOrMatrix n Choose n 1 EndBinomialOrMatrix upper P Subscript upper L Superscript n 1 Baseline left-parenthesis 1 minus upper P Subscript upper L Baseline right-parenthesis Superscript n minus n 1 Baseline 2nd Column equals 3rd Column alpha slash 2 2nd Row 1st Column sigma-summation Underscript x equals 0 Overscript n 1 minus 1 Endscripts StartBinomialOrMatrix n Choose x EndBinomialOrMatrix upper P Subscript upper U Superscript x Baseline left-parenthesis 1 minus upper P Subscript upper U Baseline right-parenthesis Superscript n minus x Baseline plus one-half StartBinomialOrMatrix n Choose n 1 EndBinomialOrMatrix upper P Subscript upper U Superscript n 1 Baseline left-parenthesis 1 minus upper P Subscript upper U Baseline right-parenthesis Superscript n minus n 1 Baseline 2nd Column equals 3rd Column alpha slash 2 EndLayout

For more information, see Agresti and Gottard (2007), Agresti (2013), Newcombe (1998b), and Brown, Cai, and DasGupta (2001).

Wilson (Score) Confidence Limits

If you specify the CL=WILSON binomial-option, PROC FREQ computes Wilson confidence limits for the binomial proportion. These are also known as score confidence limits (Wilson 1927). The confidence limits are based on inverting the normal test that uses the null proportion in the variance (the score test). Wilson confidence limits are the roots of

StartAbsoluteValue p minus ModifyingAbove p With caret EndAbsoluteValue equals z Subscript alpha slash 2 Baseline StartRoot p left-parenthesis 1 minus p right-parenthesis slash n EndRoot

and are computed as

left-parenthesis ModifyingAbove p With caret plus z Subscript alpha slash 2 Superscript 2 Baseline slash 2 n plus-or-minus z Subscript alpha slash 2 Baseline StartRoot left-parenthesis ModifyingAbove p With caret left-parenthesis 1 minus ModifyingAbove p With caret right-parenthesis plus z Subscript alpha slash 2 Superscript 2 Baseline slash 4 n right-parenthesis slash n EndRoot right-parenthesis slash left-parenthesis 1 plus z Subscript alpha slash 2 Superscript 2 Baseline slash n right-parenthesis

When you specify CL=WILSON(CORRECT) or the CORRECT binomial-option, PROC FREQ provides continuity-corrected Wilson confidence limits, which are computed as the roots of

StartAbsoluteValue p minus ModifyingAbove p With caret EndAbsoluteValue minus 1 slash 2 n equals z Subscript alpha slash 2 Baseline StartRoot p left-parenthesis 1 minus p right-parenthesis slash n EndRoot

The Wilson interval has been shown to have better performance than the Wald interval and the exact (Clopper-Pearson) interval. For more information, see Agresti and Coull (1998), Brown, Cai, and DasGupta (2001), and Newcombe (1998b).

When you specify CL=WILSON(ADAPT), PROC FREQ provides adapted Wilson confidence limits (Agresti and Coull 1998, p. 125) to improve the coverage of the confidence limits for proportions near 0 or 1. When n 1 equals 1, the adapted version replaces the lower confidence limit with left-parenthesis minus log left-parenthesis 1 minus alpha right-parenthesis slash n right-parenthesis. When n 1 equals left-parenthesis n minus 1 right-parenthesis, the adapted version replaces the upper confidence limit with left-parenthesis 1 plus log left-parenthesis 1 minus alpha right-parenthesis slash n right-parenthesis.

When you specify CL=WILSON(MODIFY), PROC FREQ provides modified Wilson confidence limits (Brown, Cai, and DasGupta 2001, pp. 112–113) to improve the coverage of the confidence limits for proportions near 0 or 1. The modified version replaces the lower confidence limit when n 1 equals 1 comma ellipsis comma n 1 Superscript asterisk, where n 1 Superscript asterisk Baseline equals 2 for n less-than-or-equal-to 50 and n 1 Superscript asterisk Baseline equals 3 otherwise. The modified lower confidence limit is computed as chi squared left-parenthesis 2 n 1 comma alpha right-parenthesis slash 2 n, where chi squared left-parenthesis 2 n 1 comma alpha right-parenthesis is the 100alphath percentile of the chi-square distribution with 2 n 1 degrees of freedom. Similarly, the modified version replaces the upper confidence limit when n 1 equals n minus n 1 Superscript asterisk Baseline comma ellipsis comma n minus 1. The modified upper confidence limit is computed as 1 – chi squared left-parenthesis 2 left-parenthesis n minus n 1 right-parenthesis comma alpha right-parenthesis slash 2 n.

Binomial Tests

The BINOMIAL option provides an asymptotic equality test for the binomial proportion by default. You can also specify binomial-options to request tests of noninferiority, superiority, and equivalence for the binomial proportion. If you specify the BINOMIAL option in the EXACT statement, PROC FREQ also computes exact p-values for the tests that you request with the binomial-options.

Equality Test

PROC FREQ computes an asymptotic test of the hypothesis that the binomial proportion equals p 0, where you can specify the value of p 0 with the P= binomial-option. If you do not specify a null value with P=, PROC FREQ uses p 0 equals 0.5 by default. The binomial test statistic is computed as

z equals left-parenthesis ModifyingAbove p With caret minus p 0 right-parenthesis slash normal s normal e

By default, the standard error is based on the null hypothesis proportion as

normal s normal e equals StartRoot p 0 left-parenthesis 1 minus p 0 right-parenthesis slash n EndRoot

If you specify the VAR=SAMPLE binomial-option, the standard error is computed from the sample proportion as

normal s normal e equals StartRoot ModifyingAbove p With caret left-parenthesis 1 minus ModifyingAbove p With caret right-parenthesis slash n EndRoot

If you specify the CORRECT binomial-option, PROC FREQ includes a continuity correction in the asymptotic test statistic, towards adjusting for the difference between the normal approximation and the discrete binomial distribution. For more information, see Fleiss, Levin, and Paik (2003). The continuity correction of left-parenthesis 1 slash 2 n right-parenthesis is subtracted from the numerator of the test statistic if left-parenthesis ModifyingAbove p With caret minus p 0 right-parenthesis is positive; otherwise, the continuity correction is added to the numerator.

PROC FREQ computes one-sided and two-sided p-values for this test. When the test statistic z is greater than 0 (its expected value under the null hypothesis), PROC FREQ computes the right-sided p-value, which is the probability of a larger value of the statistic occurring under the null hypothesis. A small right-sided p-value supports the alternative hypothesis that the true value of the proportion is greater than p 0. When the test statistic is less than or equal to 0, PROC FREQ computes the left-sided p-value, which is the probability of a smaller value of the statistic occurring under the null hypothesis. A small left-sided p-value supports the alternative hypothesis that the true value of the proportion is less than p 0. The one-sided p-value upper P 1 can be expressed as

upper P 1 equals StartLayout Enlarged left-brace 1st Row  normal upper P normal r normal o normal b left-parenthesis upper Z greater-than z right-parenthesis normal i normal f z greater-than 0 2nd Row  normal upper P normal r normal o normal b left-parenthesis upper Z less-than z right-parenthesis normal i normal f z less-than-or-equal-to 0 EndLayout

where Z has a standard normal distribution. The two-sided p-value is computed as upper P 2 equals 2 times upper P 1.

If you specify the BINOMIAL option in the EXACT statement, PROC FREQ also computes an exact test of the null hypothesis upper H 0 colon p equals p 0. To compute the exact test, PROC FREQ uses the binomial probability function,

normal upper P normal r normal o normal b left-parenthesis upper X equals x vertical-bar p 0 right-parenthesis equals StartBinomialOrMatrix n Choose x EndBinomialOrMatrix p 0 Superscript x Baseline left-parenthesis 1 minus p 0 right-parenthesis Superscript left-parenthesis n minus x right-parenthesis Baseline normal f normal o normal r x equals 0 comma 1 comma 2 comma ellipsis comma n

where the variable X has a binomial distribution with parameters n and p 0. To compute the left-sided p-value, normal upper P normal r normal o normal b left-parenthesis upper X less-than-or-equal-to n 1 right-parenthesis, PROC FREQ sums the binomial probabilities over x from 0 to n 1. To compute the right-sided p-value, normal upper P normal r normal o normal b left-parenthesis upper X greater-than-or-equal-to n 1 right-parenthesis, PROC FREQ sums the binomial probabilities over x from n 1 to n. The exact one-sided p-value is the minimum of the left-sided and right-sided p-values,

upper P 1 equals min left-parenthesis normal upper P normal r normal o normal b left-parenthesis upper X less-than-or-equal-to n 1 vertical-bar p 0 right-parenthesis comma normal upper P normal r normal o normal b left-parenthesis upper X greater-than-or-equal-to n 1 vertical-bar p 0 right-parenthesis right-parenthesis

and the exact two-sided p-value is computed as upper P 2 equals 2 times upper P 1.

Noninferiority Test

If you specify the NONINF binomial-option, PROC FREQ provides a noninferiority test for the binomial proportion. The null hypothesis for the noninferiority test is

upper H 0 colon p minus p 0 less-than-or-equal-to negative delta

versus the alternative

upper H Subscript a Baseline colon p minus p 0 greater-than negative delta

where delta is the noninferiority margin and p 0 is the null proportion. Rejection of the null hypothesis indicates that the binomial proportion is not inferior to the null value. See Chow, Shao, and Wang (2003) for more information.

You can specify the value of delta with the MARGIN= binomial-option, and you can specify p 0 with the P= binomial-option. By default, delta equals 0.2 and p 0 equals 0.5.

PROC FREQ provides an asymptotic Wald test for noninferiority. The test statistic is computed as

z equals left-parenthesis ModifyingAbove p With caret minus p 0 Superscript asterisk Baseline right-parenthesis slash normal s normal e

where p 0 Superscript asterisk is the noninferiority limit,

p 0 Superscript asterisk Baseline equals p 0 minus delta

By default, the standard error is computed from the sample proportion as

normal s normal e equals StartRoot ModifyingAbove p With caret left-parenthesis 1 minus ModifyingAbove p With caret right-parenthesis slash n EndRoot

If you specify the VAR=NULL binomial-option, the standard error is based on the noninferiority limit (determined by the null proportion and the margin) as

normal s normal e equals StartRoot p 0 Superscript asterisk Baseline left-parenthesis 1 minus p 0 Superscript asterisk Baseline right-parenthesis slash n EndRoot

If you specify the CORRECT binomial-option, PROC FREQ includes a continuity correction in the asymptotic test statistic z. The continuity correction of left-parenthesis 1 slash 2 n right-parenthesis is subtracted from the numerator of the test statistic if left-parenthesis ModifyingAbove p With caret minus p 0 Superscript asterisk Baseline right-parenthesis is positive; otherwise, the continuity correction is added to the numerator.

The p-value for the noninferiority test is

upper P Subscript z Baseline equals normal upper P normal r normal o normal b left-parenthesis upper Z greater-than z right-parenthesis

where Z has a standard normal distribution.

As part of the noninferiority analysis, PROC FREQ provides asymptotic Wald confidence limits for the binomial proportion. These confidence limits are computed as described in the section Wald Confidence Limits but use the same standard error (VAR=NULL or VAR=SAMPLE) as the noninferiority test statistic z. The confidence coefficient is 100 left-parenthesis 1 minus 2 alpha right-parenthesis% (Schuirmann 1999). By default, if you do not specify the ALPHA= option, the noninferiority confidence limits are 90% confidence limits. You can compare the confidence limits to the noninferiority limit, p 0 Superscript asterisk Baseline equals p 0 minus delta.

If you specify the BINOMIAL option in the EXACT statement, PROC FREQ provides an exact noninferiority test for the binomial proportion. The exact p-value is computed by using the binomial probability function with parameters p 0 Superscript asterisk and n,

upper P Subscript x Baseline equals sigma-summation Underscript k equals n 1 Overscript k equals n Endscripts StartBinomialOrMatrix n Choose k EndBinomialOrMatrix left-parenthesis p 0 Superscript asterisk Baseline right-parenthesis Superscript k Baseline left-parenthesis 1 minus p 0 Superscript asterisk Baseline right-parenthesis Superscript left-parenthesis n minus k right-parenthesis

For more information, see Chow, Shao, and Wang (2003, p. 116). If you request exact binomial statistics, PROC FREQ also includes exact (Clopper-Pearson) confidence limits for the binomial proportion in the equivalence analysis display. For more information, see the section Exact (Clopper-Pearson) Confidence Limits.

Superiority Test

If you specify the SUP binomial-option, PROC FREQ provides a superiority test for the binomial proportion. The null hypothesis for the superiority test is

upper H 0 colon p minus p 0 less-than-or-equal-to delta

versus the alternative

upper H Subscript a Baseline colon p minus p 0 greater-than delta

where delta is the superiority margin and p 0 is the null proportion. Rejection of the null hypothesis indicates that the binomial proportion is superior to the null value. You can specify the value of delta with the MARGIN= binomial-option, and you can specify the value of p 0 with the P= binomial-option. By default, delta equals 0.2 and p 0 equals 0.5.

The superiority analysis is identical to the noninferiority analysis but uses a positive value of the margin delta in the null hypothesis. The superiority limit equals p 0 plus delta. The superiority computations follow those in the section Noninferiority Test but replace –delta with delta. See Chow, Shao, and Wang (2003) for more information.

Equivalence Test

If you specify the EQUIV binomial-option, PROC FREQ provides an equivalence test for the binomial proportion. The null hypothesis for the equivalence test is

upper H 0 colon p minus p 0 less-than-or-equal-to delta Subscript upper L Baseline normal o normal r p minus p 0 greater-than-or-equal-to delta Subscript upper U Baseline

versus the alternative

upper H Subscript a Baseline colon delta Subscript upper L Baseline less-than p minus p 0 less-than delta Subscript upper U Baseline

where delta Subscript upper L is the lower margin, delta Subscript upper U is the upper margin, and p 0 is the null proportion. Rejection of the null hypothesis indicates that the binomial proportion is equivalent to the null value. See Chow, Shao, and Wang (2003) for more information.

You can specify the value of the margins delta Subscript upper L and delta Subscript upper U with the MARGIN= binomial-option. If you do not specify MARGIN=, PROC FREQ uses lower and upper margins of –0.2 and 0.2 by default. If you specify a single margin value delta, PROC FREQ uses lower and upper margins of –delta and delta. You can specify the null proportion p 0 with the P= binomial-option. By default, p 0 equals 0.5.

PROC FREQ computes two one-sided tests (TOST) for equivalence analysis (Schuirmann 1987). The TOST approach includes a right-sided test for the lower margin and a left-sided test for the upper margin. The overall p-value is taken to be the larger of the two p-values from the lower and upper tests.

For the lower margin, the asymptotic Wald test statistic is computed as

z Subscript upper L Baseline equals left-parenthesis ModifyingAbove p With caret minus p Subscript upper L Superscript asterisk Baseline right-parenthesis slash normal s normal e

where the lower equivalence limit is

p Subscript upper L Superscript asterisk Baseline equals p 0 plus delta Subscript upper L

By default, the standard error is computed from the sample proportion as

normal s normal e equals StartRoot ModifyingAbove p With caret left-parenthesis 1 minus ModifyingAbove p With caret right-parenthesis slash n EndRoot

If you specify the VAR=NULL binomial-option, the standard error is based on the lower equivalence limit (determined by the null proportion and the lower margin) as

normal s normal e equals StartRoot p Subscript upper L Superscript asterisk Baseline left-parenthesis 1 minus p Subscript upper L Superscript asterisk Baseline right-parenthesis slash n EndRoot

If you specify the CORRECT binomial-option, PROC FREQ includes a continuity correction in the asymptotic test statistic z Subscript upper L. The continuity correction of left-parenthesis 1 slash 2 n right-parenthesis is subtracted from the numerator of the test statistic left-parenthesis ModifyingAbove p With caret minus p Subscript upper L Superscript asterisk Baseline right-parenthesis if the numerator is positive; otherwise, the continuity correction is added to the numerator.

The p-value for the lower margin test is

upper P Subscript z comma upper L Baseline equals normal upper P normal r normal o normal b left-parenthesis upper Z greater-than z Subscript upper L Baseline right-parenthesis

The asymptotic test for the upper margin is computed similarly. The Wald test statistic is

z Subscript upper U Baseline equals left-parenthesis ModifyingAbove p With caret minus p Subscript upper U Superscript asterisk Baseline right-parenthesis slash normal s normal e

where the upper equivalence limit is

p Subscript upper U Superscript asterisk Baseline equals p 0 plus delta Subscript upper U

By default, the standard error is computed from the sample proportion. If you specify the VAR=NULL binomial-option, the standard error is based on the upper equivalence limit as

normal s normal e equals StartRoot p Subscript upper U Superscript asterisk Baseline left-parenthesis 1 minus p Subscript upper U Superscript asterisk Baseline right-parenthesis slash n EndRoot

If you specify the CORRECT binomial-option, PROC FREQ includes a continuity correction of left-parenthesis 1 slash 2 n right-parenthesis in the asymptotic test statistic z Subscript upper U.

The p-value for the upper margin test is

upper P Subscript z comma upper U Baseline equals normal upper P normal r normal o normal b left-parenthesis upper Z less-than z Subscript upper U Baseline right-parenthesis

Based on the two one-sided tests (TOST), the overall p-value for the test of equivalence equals the larger p-value from the lower and upper margin tests, which can be expressed as

upper P Subscript z Baseline equals max left-parenthesis upper P Subscript z comma upper L Baseline comma upper P Subscript z comma upper U Baseline right-parenthesis

As part of the equivalence analysis, PROC FREQ provides asymptotic Wald confidence limits for the binomial proportion. These confidence limits are computed as described in the section Wald Confidence Limits, but use the same standard error (VAR=NULL or VAR=SAMPLE) as the equivalence test statistics and have a confidence coefficient of 100 left-parenthesis 1 minus 2 alpha right-parenthesis% (Schuirmann 1999). By default, if you do not specify the ALPHA= option, the equivalence confidence limits are 90% limits. If you specify VAR=NULL, separate standard errors are computed for the lower and upper margin tests, each based on the null proportion and the corresponding (lower or upper) margin. The confidence limits are computed by using the maximum of these two standard errors. You can compare the confidence limits to the equivalence limits, left-parenthesis p 0 plus delta Subscript upper L Baseline comma p 0 plus delta Subscript upper U Baseline right-parenthesis.

If you specify the BINOMIAL option in the EXACT statement, PROC FREQ also provides an exact equivalence test by using two one-sided exact tests (TOST). The procedure computes lower and upper margin exact tests by using the binomial probability function as described in the section Noninferiority Test. The overall exact p-value for the equivalence test is taken to be the larger p-value from the lower and upper margin exact tests. If you request exact statistics, PROC FREQ also includes exact (Clopper-Pearson) confidence limits in the equivalence analysis display. The confidence coefficient is 100 left-parenthesis 1 minus 2 alpha right-parenthesis% (Schuirmann 1999). For more information, see the section Exact (Clopper-Pearson) Confidence Limits.

Last updated: December 09, 2022