|
MEAN RANKName:
A typical use of this command is to see how a method (or batch or some other variable of interest) performs across various conditions of several other factor variables.
<SUBSET/EXCEPT/FOR qualification> where <y> is a response variable; <xseq> is a variable that defines the sequence number for the response variable; <x1> ... <x6> is a list of one to six group-id variables; and where the <SUBSET/EXCEPT/FOR qualification> is optional.
LET AVERANK = MEAN RANK Y XSEQ X1 X2 X3 SUBSET XSEQ = 2 TO 10
only a single value will be saved in the output variable for each distinct combination of the group-id variables. In order to preserve the appropriate values of the group-id variables, you can enter the commands (assuming six group-id variables)
LET X2D = CROSS TABULATE GROUP TWO X1 X2 X3 X4 X5 X6 LET X3D = CROSS TABULATE GROUP THREE X1 X2 X3 X4 X5 X6 LET X4D = CROSS TABULATE GROUP FOUR X1 X2 X3 X4 X5 X6 LET X5D = CROSS TABULATE GROUP FIVE X1 X2 X3 X4 X5 X6 LET X6D = CROSS TABULATE GROUP SIX X1 X2 X3 X4 X5 X6 To restore the default, enter
. Step 1: Read the data
.
dimension 20 columns
set write decimals 2
.
skip 25
read sheesle2.dat y x1 x2 x3 x4 x5
let n = size y
let xseq = sequence 1 1 6 for i = 1 1 n
.
. Step 2: Execute the command
.
let yout = mean rank y xseq x2 x3
print yout y xseq x2 x3
The following output is returned
---------------------------------------------------------------------------
YOUT Y XSEQ X2 X3
---------------------------------------------------------------------------
5.25 28.40 1.00 1.00 1.00
1.75 21.90 2.00 1.00 1.00
4.00 36.80 3.00 1.00 1.00
2.75 19.20 4.00 1.00 1.00
5.00 28.20 5.00 1.00 1.00
2.25 26.60 6.00 1.00 1.00
5.25 30.40 1.00 1.00 2.00
1.75 25.10 2.00 1.00 2.00
4.00 25.50 3.00 1.00 2.00
2.75 21.50 4.00 1.00 2.00
5.00 26.00 5.00 1.00 2.00
2.25 21.90 6.00 1.00 2.00
5.25 20.20 1.00 2.00 1.00
1.75 14.30 2.00 2.00 1.00
4.00 19.90 3.00 2.00 1.00
2.75 22.50 4.00 2.00 1.00
5.00 23.40 5.00 2.00 1.00
2.25 18.50 6.00 2.00 1.00
5.25 38.20 1.00 2.00 2.00
1.75 12.80 2.00 2.00 2.00
4.00 22.00 3.00 2.00 2.00
2.75 22.50 4.00 2.00 2.00
5.00 30.30 5.00 2.00 2.00
2.25 17.70 6.00 2.00 2.00
|
Privacy
Policy/Security Notice
NIST is an agency of the U.S.
Commerce Department.
Date created: 11/08/2018 | |||||||||||||||||||