pro in sas
AB
requests an analysis using Ansari-Bradley scores
ANOVA
requests a standard analysis of variance on the raw data
CORRECT=NO
suppresses the continuity correction for the Wilcoxon two-sample test and the Siegel-Tukey two-sample test
DATA=SAS-data-set
names the SAS data set to be analyzed by PROC NPAR1WAY. If you omit the DATA= option, the procedure uses the most recently created SAS data set
EDF
requests statistics based on the empirical distribution function. These include the Kolmogorov-Smirnov and Cramer-von Mises statistics and, if there are only two classification levels, the Kuiper statistic
KLOTZ
requests an analysis using Klotz scores
MEDIAN
requests an analysis using median scores. When there are two classification levels, or two samples, this option produces the two-sample median test. When there are more than two samples, this option produces the multisample median test, which is also known as the Brown-Mood test
MISSING
interprets missing values of the CLASS variable as a valid class level
MOOD
requests an analysis using Mood scores
NOPRINT
suppresses the display of all output. You can use the NOPRINT option when you only want to create an output data set. Note that this option temporarily disables the Output Delivery System (ODS
SAVAGE
requests an analysis using Savage scores
SCORES=DATA
requests an analysis using raw input data as scores. This option gives you the flexibility to construct any scores for your data with the DATA step and then analyze these scores with PROC NPAR1WAY
ST
requests an analysis using Siegel-Tukey scores
VW
requests an analysis using Van der Waerden scores
WILCOXON
requests an analysis using Wilcoxon scores. When there are two classification levels, or two samples, this option produces the Wilcoxon rank-sum test. For any number of classification levels, this option produces the Kruskal-Wallis test.
Wilcoxon Scores
Wilcoxon scores are the ranks of the observations
a(Rj) = Rj
Using Wilcoxon scores in the linear rank statistic for two-sample data produces the rank sum statistic of the Mann-Whitney-Wilcoxon test. Using Wilcoxon scores in the one-way ANOVA statistic produces the Kruskal-Wallis test. Wilcoxon scores are locally most powerful for location shifts of a logistic distribution
When computing the asymptotic Wilcoxon two-sample test, PROC NPAR1WAY uses a continuity correction by default, as described in the "Simple Linear Rank Tests for Two-Sample Data" section. If you specify CORRECT=NO in the PROC NPAR1WAY statement, the procedure does not use a continuity correction.
Median Scores
Median scores equal 1 for observations greater than the median, and 0 otherwise
Wilcoxon-Mann-Whitney test
The Wilcoxon-Mann-Whitney test is a non-parametric analog to the independent samples t-test and can be used when you do not assume that the dependent variable is a normally distributed interval variable (you need only assume that the variable is at least ordinal). We will use the same data file (the hsb2 data file) and the same variables in this example as we did in the independent t-test example above and will not assume that write, our dependent variable, is normally distributed.
proc npar1way data = "c:\mydata\hsb2" wilcoxon; class female; var write; run;The NPAR1WAY Procedure Wilcoxon Scores (Rank Sums) for Variable write Classified by Variable female Sum of Expected Std Dev Meanfemale N Scores Under H0 Under H0 Score----------------------------------------------------------------------0 91 7792.0 9145.50 406.559086 85.6263741 109 12308.0 10954.50 406.559086 112.917431 Average scores were used for ties. Wilcoxon Two-Sample Test Statistic 7792.0000 Normal ApproximationZ -3.3279One-Sided Pr < Z 0.0004Two-Sided Pr > |Z| 0.0009 t ApproximationOne-Sided Pr < Z 0.0005Two-Sided Pr > |Z| 0.0010 Z includes a continuity correction of 0.5.
The results suggest that there is a statistically significant difference between the underlying distributions of the write scores of males and the write scores of females (z = -3.329, p = 0.0009
Friedman test
You perform a Friedman test when you have one within-subjects independent variable with two or more levels and a dependent variable that is not interval and normally distributed (but at least ordinal). We will use this test to determine if there is a difference in the reading, writing and math scores. The null hypothesis in this test is that the distribution of the ranks of each type of score (i.e., reading, writing and math) are the same. To conduct a Friedman test, the data need to be in a long format; we will use proc transpose to change our data from the wide format that they are currently in to a long format. We create a variable to code for the type of score, which we will call rwm (for read, write, math), and col1 that contains the score on the dependent variable, that is the reading, writing or math score. To obtain the Friedman test, you need to use the cmh2 option on the tables statement in proc freq.
proc sort data = "c:\mydata\hsb2" out=hsbsort; by id;run; proc transpose data=hsbsort out=hsblong name=rwm; by id; var read write math;run; proc freq data=hsblong; tables id*rwm*col1 / cmh2 scores=rank noprint;run;The FREQ Procedure Summary Statistics for rwm by COL1Controlling for id Cochran-Mantel-Haenszel Statistics (Based on Rank Scores) Statistic Alternative Hypothesis DF Value Prob--------------------------------------------------------------- 1 Nonzero Correlation 1 0.0790 0.7787 2 Row Mean Scores Differ 2 0.6449 0.7244 Total Sample Size = 600
The Row Mean Scores Differ is the same as the Friedman's chi-square, and we see that with a value of 0.6449 and a p-value of 0.7244, it is not statistically significant. Hence, there is no evidence that the distributions of the three types of scores are different
با تشکر از کسانی که با نظرات و انتقادهای خود باعث بالا رفتن کیفیت وبلاگ می شوند.