|
GENERATE MATRIXName:
The specified statistic should require exactly two response variables to compute. Examples include correlation and covariances, various distance measures, differences of location or scale statistics, and so on. Statistics that require a single response variable or more than two response variables will return an error. A number of supported statistics that require two response variables have the second variable as a group-id variable. Although this command will not generate a syntax error for these cases, the resulting statistics will not be meaningful.
<SUBSET/EXCEPT/FOR qualification> where <stat> is one of Dataplot's supported statistics that requires exactly two response variable; <var1> ... <vark> is a list of previously defined variables; <mat1> is a matrix where the resulting matrix is saved; and where the <SUBSET/EXCEPT/FOR qualification> is optional.
LET D = GENERATE MATRIX MANHATTAN DISTANCE Y1 Y2 Y3 Y4 Y5
set write decimals 3
dimension 100 columns
.
skip 25
read iris.dat y1 y2 y3 y4
skip 0
.
. Step 2: Generate the matrix
.
let m = generate matrix correlation y1 y2 y3 y4
print m
.
let m = generate matrix euclidean distance y1 y2 y3 y4
print m
.
let m = generate matrix difference of means y1 y2 y3 y4
print m
The following output is generated
MATRIX CORR -- 4 ROWS
-- 4 COLUMNS
VARIABLES--CORR1 CORR2 CORR3 CORR4
1.000 -0.118 0.850 0.691
-0.118 1.000 -0.472 -0.068
0.850 -0.472 1.000 0.712
0.691 -0.068 0.712 1.000
MATRIX D -- 4 ROWS
-- 4 COLUMNS
VARIABLES--D1 D2 D3 D4
0.000 36.158 35.262 61.489
36.158 0.000 30.185 29.383
35.262 30.185 0.000 37.665
61.489 29.383 37.665 0.000
MATRIX DIFF -- 4 ROWS
-- 4 COLUMNS
VARIABLES--DIFF1 DIFF2 DIFF3 DIFF4
0.000 2.786 2.419 4.977
-2.786 0.000 -0.367 2.191
-2.419 0.367 0.000 2.559
-4.977 -2.191 -2.559 0.000
|
Privacy
Policy/Security Notice
NIST is an agency of the U.S.
Commerce Department.
Date created: 08/31/2017 | |||||||||||||