The NPAR1WAY Procedure

STRATA Statement

  • STRATA variables < / options > ;

The STRATA statement names one or more variables that define the strata. The levels of the STRATA variables combine to form the strata, which are nonoverlapping subgroups.

The STRATA variables can be either character or numeric. PROC NPAR1WAY uses the formatted values of the STRATA variables to determine the STRATA variable levels. Thus, you can use formats to group values into levels. For more information, see the discussion of the FORMAT procedure in the Base SAS Procedures Guide and the discussions of the FORMAT statement and SAS formats in SAS Formats and Informats: Reference.

PROC NPAR1WAY excludes an observation from the stratified analysis if it has a missing value for any STRATA variable unless you specify the MISSING option in the PROC NPAR1WAY statement. When you specify the MISSING option, PROC NPAR1WAY treats missing values of the STRATA variables as valid, nonmissing levels. For more information, see the section Missing Values.

You can request stratified analyses by specifying one or more score type options (WILCOXON , MEDIAN , VW|NORMAL , SAVAGE , and SCORES=DATA ) in the STRATA statement. If you do not specify a score type option in the STRATA statement (or the ALIGN=STRATA option in the PROC NPAR1WAY statement), PROC NPAR1WAY performs stratified analysis of Wilcoxon scores by default. The statistic options in the PROC NPAR1WAY statement request unstratified analyses; the statistic options in the STRATA statement request stratified analyses.

Stratified analysis is available for two-sample data (when the data are classified into two levels by the CLASS variable). For more information, see the section Stratified Analysis.

If you specify the ALIGN=STRATA option in the PROC NPAR1WAY statement along with a STRATA statement, PROC NPAR1WAY aligns the analysis variable values by strata before performing the unstratified analyses that you request (by specifying options in the PROC NPAR1WAY statement). When you specify the ALIGN=STRATA option to compute aligned analysis, you cannot also specify STRATA statement options to perform stratified analysis.

You can specify the following options after a slash (/):

MEDIAN

requests a stratified analysis of median scores. For more information, see the sections Median Scores and Stratified Analysis.

RANKS=STRATUM | OVERALL

specifies the type of ranking to be used for stratified analysis. RANKS=STRATUM ranks (and scores) the observations separately within each stratum. RANKS=OVERALL ranks (and scores) the observations overall (without regard to stratum classification) before stratified analysis is performed. By default, RANKS=STRATUM. For more information, see the section Stratified Analysis.

SAVAGE

requests a stratified analysis of Savage scores. For more information, see the sections Savage Scores and Stratified Analysis.

SCORES=DATA
PERM

requests a stratified analysis of the raw (unscored) values of the analysis variable. This option enables you to construct any scores for your data (for example, by using the DATA step) and analyze the scores by using PROC NPAR1WAY. For more information, see the sections Scores for Linear Rank and One-Way ANOVA Tests and Stratified Analysis.

VW
NORMAL

requests a stratified analysis of Van der Waerden (normal) scores. For more information, see the sections Van der Waerden (Normal) Scores and Stratified Analysis.

WEIGHTS=STRATUM | EQUAL

specifies the stratum weights for stratified analysis. WEIGHTS=STRATUM weights the stratum statistics by stratum size; the weight of stratum i is $1/(n_ i+1)$, where $n_ i$ is the number of observations (frequency) in stratum i. WEIGHTS=EQUAL weights the stratum statistics equally; the weight of each stratum is 1. For more information, see the section Stratified Analysis.

When you specify RANKS=OVERALL , WEIGHTS=EQUAL by default; otherwise, WEIGHTS=STRATUM by default.

WILCOXON

requests a stratified analysis of Wilcoxon scores. For more information, see the sections Wilcoxon Scores and Stratified Analysis. By default (when WEIGHTS=STRATUM and RANKS=STRATUM ), the stratified Wilcoxon test is the van Elteren test (VanĀ Elteren 1960).