The SEQDESIGN Procedure

Example 103.1 Creating Fixed-Sample Designs

(View the complete code for this example.)

This example demonstrates a one-sided fixed-sample design and a two-sided fixed-sample design. The following statements request a fixed-sample design with an upper alternative:

ods graphics on;
proc seqdesign pss
               ;
   OneSidedFixedSample: design nstages=1
                               alt=upper
                               alpha=0.025 beta=0.10
                               ;
   samplesize model=onesamplemean(mean=0.25);
run;

In the DESIGN statement, the label OneSidedFixedSample identifies the design in the output tables. The NSTAGES=1 option specifies that the design has only one stage; this corresponds to a fixed-sample design. In the SEQDESIGN procedure, the null hypothesis for the design is and the ALT=UPPER option specifies an upper alternative hypothesis . The MEAN=0.25 option in the SAMPLESIZE statement specifies the upper alternative reference .

The options ALPHA=0.025 and BETA=0.10 specify the Type I error probability level and the Type II error probability level . That is, the design has a power at .

The "Design Information" table in Output 103.1.1 displays design specifications and the derived statistics such as power. As expected, the derived statistics such as maximum information and average sample number (in percentage of its corresponding fixed-sample information) are 100 for the fixed-sample design (NSTAGES=1). Also, for a fixed-sample design, the STOP= and METHOD= options in the DESIGN statement are not applicable.

Output 103.1.1: One-Sided Fixed-Sample Design Information

The SEQDESIGN Procedure
Design: OneSidedFixedSample

Design Information
Statistic DistributionNormal
Boundary ScaleStandardized Z
Alternative HypothesisUpper
Alternative Reference0.25
Number of Stages1
Alpha0.025
Beta0.1
Power0.9
Max Information (Percent of Fixed Sample)100
Max Information168.1188
Null Ref ASN (Percent of Fixed Sample)100
Alt Ref ASN (Percent of Fixed Sample)100


The "Method Information" table in Output 103.1.2 displays the and error levels. It also displays the derived drift parameter, which is the standardized reference improvement, , where is the alternative reference and is the maximum information for the design. If either or is specified, the other statistic is derived in the SEQDESIGN procedure. For a fixed-sample design,

Output 103.1.2: Method Information

Method Information
BoundaryAlphaBetaAlternative
Reference
Drift
Upper Alpha0.025000.100000.253.241516


The "Boundary Information" table in Output 103.1.3 displays information level, alternative reference, and boundary value at each stage. The information proportion indicates the proportion of maximum information available at the stage. With only one stage for a fixed-sample design, the proportion is 1. With the SAMPLESIZE statement, the required sample size N is also displayed under the heading "Information Level."

Output 103.1.3: Boundary Information

Boundary Information (Standardized Z Scale)
Null Reference = 0
_Stage_ AlternativeBoundary Values
Information LevelReferenceUpper
ProportionActualNUpperAlpha
11.0000168.1188168.11883.241521.95996


By default (or equivalently if you specify BOUNDARYSCALE=STDZ), output alternative references and boundaries are displayed with the standardized normal Z scale. The alternative reference on the standardized Z scale at stage 1 is given by , where is the information level at stage 1. With a boundary value 1.96, the hypothesis of is rejected if the standardized normal statistic .

With ODS Graphics enabled, a detailed boundary plot with the rejection and acceptance regions is displayed, as shown in Output 103.1.4. The boundary values in the "Boundary Information" table in Output 103.1.3 are displayed in the plot.

Output 103.1.4: Boundary Plot

Boundary Plot


The "Sample Size Summary" table in Output 103.1.5 displays parameters for the sample size computation of the test for a normal mean.

Output 103.1.5: Sample Size Summary

Sample Size Summary
TestOne-Sample Mean
Mean0.25
Standard Deviation1
Max Sample Size168.1188
Expected Sample Size (Null Ref)168.1188
Expected Sample Size (Alt Ref)168.1188


The "Sample Sizes (N)" table in Output 103.1.6 displays the derived sample sizes, in both fractional and integer numbers. With the resulting integer sample sizes, the corresponding information level is slightly larger than the level from the design. This can increase the power slightly if the integer sample size is used in the trial.

Output 103.1.6: Derived Sample Sizes

Sample Sizes (N)
One-Sample Z Test for Mean
_Stage_Fractional NCeiling N
NInformationNInformation
1168.12168.1169169.0


The following statements request a two-sided fixed-sample design with a specified alternative reference:

ods graphics on;
proc seqdesign altref=1.2
               pss
               ;
   TwoSidedFixedSample: design nstages=1
                               alt=twosided
                               alpha=0.05 beta=0.10
                               ;
   samplesize model=twosamplemean(stddev=2 weight=2);
run;

In the SEQDESIGN procedure, the null hypothesis for the design is . The ALT=TWOSIDED option specifies a two-sided alternative hypothesis . The ALTREF=1.2 option in the PROC SEQDESIGN statement specifies the alternative reference .

The ALPHA=0.05 option (which is the default) specifies the two-sided Type I error probability level . That is, the lower and upper Type I error probabilities . The BETA=0.10 option (which is the default) specifies the Type II error probability level , and the design has a power at the alternative reference .

The "Design Information" table in Output 103.1.7 displays design specifications and the derived power. With a specified alternative reference, the maximum information is derived.

Output 103.1.7: Two-Sided Fixed-Sample Design Information

The SEQDESIGN Procedure
Design: TwoSidedFixedSample

Design Information
Statistic DistributionNormal
Boundary ScaleStandardized Z
Alternative HypothesisTwo-Sided
Alternative Reference1.2
Number of Stages1
Alpha0.05
Beta0.1
Power0.9
Max Information (Percent of Fixed Sample)100
Max Information7.296822
Null Ref ASN (Percent of Fixed Sample)100
Alt Ref ASN (Percent of Fixed Sample)100


The "Method Information" table in Output 103.1.8 displays the and errors, alternative references, and drift parameter. For a fixed-sample design, the derived drift parameter

Output 103.1.8: Method Information

Method Information
BoundaryAlphaBetaAlternative
Reference
Drift
Upper Alpha0.025000.100001.23.241516
Lower Alpha0.025000.10000-1.2-3.24152


With a specified alternative reference , the maximum information

The default "Boundary Information" table in Output 103.1.9 displays information level, alternative reference, and boundary values. By default (or equivalently if you specify BOUNDARYSCALE=STDZ), the alternative reference and boundary values are displayed with the standardized normal Z scale. Thus, the standardized alternative references are displayed.

Output 103.1.9: Boundary Information

Boundary Information (Standardized Z Scale)
Null Reference = 0
_Stage_ AlternativeBoundary Values
Information LevelReferenceLowerUpper
ProportionActualNLowerUpperAlphaAlpha
11.00007.296822131.3428-3.241523.24152-1.959961.95996


With boundary values of –1.96 and 1.96, the hypothesis of is rejected if the standardized normal statistic or .

With ODS Graphics enabled, a detailed boundary plot with the rejection and acceptance regions is displayed, as shown in Output 103.1.10 . The boundary values in the "Boundary Information" table in Output 103.1.9 are displayed in the plot.

Output 103.1.10: Boundary Plot

Boundary Plot


The "Sample Size Summary" table in Output 103.1.11 displays parameters for the sample size computation of the test for a normal mean.

Output 103.1.11: Sample Size Summary

Sample Size Summary
TestTwo-Sample Means
Mean Difference1.2
Standard Deviation2
Max Sample Size131.3428
Expected Sample Size (Null Ref)131.3428
Expected Sample Size (Alt Ref)131.3428
Weight (Group A)2
Weight (Group B)1


The "Sample Sizes (N)" table in Output 103.1.12 displays the derived sample sizes, in both fractional and integer numbers. With the WEIGHT=2 option, the allocation ratio is 2 for the first group and 1 for the second group. With the resulting integer sample sizes, the corresponding information level is slightly larger than the level from the design. This can increase the power slightly if the integer sample size is used in the trial.

Output 103.1.12: Derived Sample Sizes

Sample Sizes (N)
Two-Sample Z Test for Mean Difference
_Stage_Fractional NCeiling N
NN(Grp 1)N(Grp 2)InformationNN(Grp 1)N(Grp 2)Information
1131.3487.5643.787.296813288447.3333