|
MATRIX PARTITION STATISTICName:
Note that this command returns a matrix of statistic values. For this command, you specify the number of rows and columns for each of the sub-matrices. Dataplot starts the partitioning with position 1,1 of the original matrix. For example, if you have a matrix with 5 rows and 5 columns and you specify sub-matrices with 2 rows and 2 columns, the following partitioning will be performed: Matrix 1,1 Matrix 1,2 Matrix 1,3 1 2 3 4 5 6 7 8 9 10 Matrix 2,1 Matrix 2,2 Matrix 2,3 11 12 13 14 15 16 17 18 19 20 Matrix 3,1 Matrix 3,2 Matrix 3,3 21 22 23 24 25 A 3x3 matrix of computed statistics will be returned. This command was extended to the case of unequal partitions where the partitions need not be contiguous. For this case, we define two vectors. The first corresponds to the rows of the matrix while the second corresponds to the number of columns in the matrix. The elements of these two vectors identify which partition each element of the original matrix belongs to. For the 5x5 example above, suppose we want rows 1, 3, and 5 and columns 1, 4, and 5 to belong to partition 1 and rows 2 and 4 and columns 2 and 3 to belong to partition 2, we would create the following vectors: row vector column vector ---------- ------------- 1 1 2 2 1 2 2 1 1 1
Matrix 1,1 Matrix 1,2 1 4 5 2 3 11 14 15 12 13 21 24 25 22 23 Matrix 2,1 Matrix 2,2 6 8 9 7 8 16 19 20 17 18
<SUBSET/EXCEPT/FOR qualification> where <mat> is a matrix for which the statistic is to be computed; <stat> is the desired statistic to compute; <nrow> is the number of rows in each sub-matrix; <ncol> is the number of columns in each sub-matrix; <mout> is a matrix where the computed statistics are saved; and where the <SUBSET/EXCEPT/FOR qualification> is optional. The specified statistic can be any of the following:
GEOMETRIC MEAN, HARMONIC MEAN, HODGES LEHMAN, BIWEIGHT LOCATION, SUM, PRODUCT, STANDARD DEVIATION, STANDARD DEVIATION OF MEAN, VARIANCE, VARIANCE OF THE MEAN, TRIMMED MEAN STANDARD ERROR, AVERAGE ABSOLUTE DEVIATION (or AAD), MEDIAN ABSOLUTE DEVIATION (or MAD), IQ RANGE, BIWEIGHT MIDVARIANCE, BIWEIGHT SCALE, PERCENTAGE BEND MIDVARIANCE, WINSORIZED VARIANCE, WINSORIZED STANDARD DEVIATION, RELATIVE STANDARD DEVIATION, RELATIVE VARIANCE (or COEFFICIENT OF VARIATION), RANGE, MIDRANGE, MAXIMUM, MINIMUM, EXTREME, LOWER HINGE, UPPER HINGE, LOWER QUARTILE, UPPER QUARTILE, <FIRST/SECOND/THIRD/FOURTH/FIFTH/SIXTH/SEVENTH/EIGHTH/ NINTH/TENTH> DECILE, PERCENTILE, QUANTILE, QUANTILE STANDARD ERROR, SKEWNESS, KURTOSIS, NORMAL PPCC, AUTOCORRELATION, AUTOCOVARIANCE, SINE FREQUENCY, SINE AMPLITUDE, CP, CPK, CNPK, CPM, CC, EXPECTED LOSS, PERCENT DEFECTIVE, TAGUCHI SN0 (or SN), TAGUCHI SN+ (or SNL), TAGUCHI SN- (or SNS), TAGUCHI SN00 (or SN2)
<SUBSET/EXCEPT/FOR qualification> where <mat> is a matrix for which the statistic is to be computed; <stat> is the desired statistic to compute; <tagrow> is a vector that specifies which partition each row of the matrix belongs to; <tagcol> is a vector that specifies which partition each column of the matrix belongs to; <mout> is a matrix where the computed statistics are saved; and where the <SUBSET/EXCEPT/FOR qualification> is optional. This syntax is for the case where the partitions need not be equi-spaced or contiguous. The list of supported statistics is the same as for syntax 1.
LET MOUT = MATRIX PARTITION MEDIAN M 10 5 LET MOUT = MATRIX PARTITION SD M 2 2
Statistics for all elements of a matrix can be computed with the MATRIX GRAND STATISTIC command. Enter HELP MATRIX GRAND STATISTIC for details.
2005/7: Extended to case where partitions need not be equi-spaced or contiguous. READ MATRIX DAT M 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 END OF DATA . LET MATMEAN = MATRIX PARTITION MEAN M 2 2 LET MATSD = MATRIX PARTITION SD M 2 2 LET MATSUM = MATRIX PARTITION SUM M 2 2Program 2: dimension 50 columns skip 25 read iris.dat y1 y2 y3 y4 x let m = create matrix y1 y2 y3 y4 . let coltag = data 1 2 3 4 . let matmed = matrix partition median m x coltag set write decimals 2 print matmed
Date created: 6/30/2005 |