MacroCollectionDescriptionRelated macros / See also

!KO_ACATBIN

Categorical - Binary recodings

Automatic recoding of categorical variables into binary dummy variables. Creates dummy (indicator, one-hot) variables out of input integer-valued categorical variables. It creates “automatically”, i.e., for all observed values of an input variable. For each value present, one dummy variable will be created out of the input variable. When input variables are multiple, they don’t have to have same values.

!KO_CATBIN

!KO_ACATBIN2

!KO_HFREQ

!KO_CATCONT

!KO_MRDMRC

!KO_FREQ


!KO_ACATBIN2

Categorical - Binary recodings

Automatic recoding of categorical variables into binary dummy variables. This macro is another programmic realization of !KO_ACATBIN; it is similar in options and same in results. With big data, it tends to be somewhat faster than the other macro.

!KO_CATBIN

!KO_ACATBIN

!KO_HFREQ

!KO_CATCONT

!KO_MRDMRC

!KO_FREQ

!KO_ACORRD

Various proximities

Autocorrelative distance. This distance confers importance to differences that are systematic in the sense of one-lag autocorrelation, i.e., they continue at moving from a case to next case in the dataset. Mathematically the distance is just the non-normalized autocorrelation coefficient of differences between the two compared series, variables X and Y.

!KO_AGGR

MATRIX – END MATRIX functions

The requested descriptive statistic (sum, mean, variance, or some other) in the columns of data, by groups of cases and total.

!KO_AGGRV

!KO_GDESCR

!KO_AGGRTAB

MATRIX – END MATRIX functions

Multi-way frequency aggregation: frequency crossing between any number of variables (data columns) at once. Result – in the form of aggregation. Also, returns dataset of dummy variables corresponding to the interaction of higher order.

!KO_CROSSTAB

!KO_BAGGRTAB

!KO_AGGRV

MATRIX – END MATRIX functions

Replace values in the columns of data by the computed in them descriptive statistic (sum, mean, variance, or some other), by groups of cases and total.

!KO_AGGR

!KO_AHP

Analytic Hierarchy Process

Saaty’s Analytic Hierarchy Process allows to decide on a choice from the alternatives when the hierarchy of elements leading to the goal is built, the alternatives being the elements of the lowest level of the hierarchy.

!KO_AICBIC

Internal clustering criteria

Internal clustering criteria: information indices AIC and BIC. Cluster validity indices based on the idea of entropy; allow for a mix of scale and nominal variables.

!KO_RATLAN

!KO_ALLCOMB

MATRIX – END MATRIX functions

Returns all combinations by k elements (from one set).

!KO_COMBK

!KO_AMONGCATS

Compare proportions

Comparison of proportions of categories in categorical variable, or proportions of positive response in binary variables set. The macro (i) takes one categorical variable and compares sizes (proportions) of its categories between each other – a “multiclass” comparison. Or (ii) takes a set of binary variables and compares proportions of positive response between them – a “multilabel” comparison. Comparisons are pairwise (binomial asymptotic or exact test, asymptotic or exact McNemar’s test, post-hoc based on Dunn’s test). There is an option to do previously omnibus test (chi-square of agreement, Cochran’s Q test). Display of percents and significant results imitates the Custom Tables style. And you can order to compute confidence intervals, draw charts, and report details of the analysis.

!KO_AMRCMRD

Categorical - Binary recodings

Automatic recoding of categorical multiple response set (MRC) into dichotomous multiple response set (MRD). Recodes integer-valued categorical variables with a common pool of values into a series of binary variables forming a dichotomous multiple response set. It creates the variables “automatically”, i.e., for all observed values of the totality of input variables. For each value present, the binary variable will be created out of the input set of variables. There exists an option to account for repeating within respondent (to create the variables as count).

!KO_MRCMRD

!KO_AMRCMRD2

!KO_HFREQ

!KO_MRDMRC

!KO_MRFREQ


!KO_AMRCMRD2

Categorical - Binary recodings

Automatic recoding of categorical multiple response set (MRC) into dichotomous multiple response set (MRD). This macro is another programmic realization of !KO_AMRCMRD; it is similar in options and same in results.

!KO_MRCMRD

!KO_AMRCMRD

!KO_HFREQ

!KO_MRDMRC

!KO_MRFREQ


!KO_APRIORI

MATRIX – END MATRIX functions

SPSS realization of Apriori algorithm which counts frequencies of “frequent enough” elements and combinations of elements. The frequency (called “support”) is the subset frequency. For example, the support for {1,3} in the data {1,3}, {1,2,5}, {1,3,5}, {1,2,3,4} is 3.

!KO_MRFREQ

!KO_ASSCLU

Clustering

Cluster assembly / object assignment to clusters (input – a square proximity matrix). This macro is intended (i) to establish proximities between known clusters (or generally, between any groups by a nominal variable), and (ii) to enlist objects whose belonging to the clusters/groups is unknown (“new objects”) to their nearest clusters/groups. Proximities (between clusters, between clusters and objects) are computed by the methods used in hierarchical cluster analysis; there are 12 methods to choose from.

!KO_HIECLU

!KO_HIECLUEX

!KO_DBWCFRD

!KO_DABWFRD

!KO_DBWFFRD

!KO_DBWNFRD


!KO_BAGGRTAB

MATRIX – END MATRIX functions

Multi-way frequency aggregation (dichotomous data). This is the variant of function !KO_AGGRTAB and is for dichotomous data only.

!KO_AGGRTAB

!KO_BFS

MATRIX – END MATRIX functions

SPSS realization of breadth-first search algorithm for a unipartite graph. May obtain full or truncated tree, as well as forest of trees.

!KO_DFS

!KO_BINCNT

MATRIX – END MATRIX functions

Co-counts matrices for binary data. For binary columns, returns matrices of counts A, B, C, D (counts also known as true-positives, false-negatives, false-positives, true-negatives). Many proximity measures invented for binary data can be computed with these.

!KO_BINOM

MATRIX – END MATRIX functions

Generates vector of random values from binomial distribution with specified parameters (number of trials and probability of success).

!KO_BIPLOT

MATRIX – END MATRIX functions

Biplot is a method of dimensionality reduction  for columns and rows of a rectangular matrix. It is a close relative to principal component analysis and correspondence analysis. There is an option to give different weight to different rows and columns, and flexible endowing with inertia.

!KO_PCOMP

!KO_CORRESP

!KO_BISER

Various proximities

Computes rectangular matrix of biserial correlation coefficients between scale and binary variables, and their significances.

!KO_BIV

MATRIX – END MATRIX functions

For two variables: covariance, correlation, cosine similarity, identity coefficient, similarity ratio.

!KO_COV

!KO_CORR

!KO_COSINE

!KO_IDC

!KO_SIMR

!KO_RECT

!KO_BLOCKDIAG

Clustering tendency

Block-diagonalization by VAT/IVAT and MDS methods  reorders rows/columns of square distance matrix to concentrate small distances near the diagonal. The macro renders the block-diagonalized matrix on the “heatmap”, wherefrom one can get an impression about the presence of cluster structure in the data and to estimate tentatively the number of clusters.

!KO_VAT

!KO_BLOCKIC

MATRIX – END MATRIX functions

Block-incut is the slant (diagonal) concatenation of two matrices in the way one of them is cut into the other at a given depth.

!KO_BORROW

Impute missing data

Borrowing of values from indicated other cases. Carries over values from defined cases-donors to current cases-recipients within the same variables. A value will be borrowed (imputed) if it satisfies a specified condition (for example, “missing in recipient case, but valid in donor case”).

!KO_HDIMPUTE

!KO_HOTDECK


!KO_BOXCOX

MATRIX – END MATRIX functions

Box-cox transform. Transforms a quantitative variable monotonically by exponentiation so that its distribution become closer to normal. Selecting of the parameter lambda value is done by grid search.

!KO_BRONKERB

MATRIX – END MATRIX functions

SPSS realization of Bron-Kerbosch maximal cliques enumeration algorithm (pivot version).

!KO_BRONKERB2

!KO_BRONKERB2

MATRIX – END MATRIX functions

SPSS realization of Bron-Kerbosch maximal cliques enumeration algorithm (base version).

!KO_BRONKERB

!KO_BWSCAT

MATRIX – END MATRIX functions

Between-group scatter matrix and pooled within-group scatter matrix.

!KO_SSWFRD

!KO_CALHARM

Internal clustering criteria

Same as !KO_CALHARV, but input – matrix.

!KO_CALHARV

!KO_CALHARV

Internal clustering criteria

Internal clustering criteria: Calinski-Harabasz; SSW “elbow”; Log SS ratio. Cluster validity indices based on ANOVA. Input – variables.

!KO_CALHARM

!KO_CANCORR

MATRIX – END MATRIX functions

Canonical correlation analysis (extraction of canonical variates, without significance tests).

!KO_DISCRIM

!KO_REGRESS


!KO_CARTP

MATRIX – END MATRIX functions

Cartesian product between two sets. There is an option not to pair elements with the same index numbers.

!KO_NCARTP

!KO_CASTOVAR

MATRIX – END MATRIX functions

Restructuring “cases into variables”, or “long into wide format”. Reshaps each group of K cases (data rows) into single row. This way each variable (column) gets broken in K columns.

!KO_VARTOCAS

!KO_CATBIN

Categorical - Binary recodings

Recode variables into binary dummy variables. Creates dummy (indicator, one-hot) variables for user-specified values of input variables. For each specified value, one dummy variable will be created out of the input variable. When input variables are multiple, the user-specified set of values is uniform for them all, so each variable will yield the same number of binary variables. The macro has an option to treat multiple input variables as a “repeated measures series” with their order important – to impose extra condition for recoding.

!KO_ACATBIN

!KO_ACATBIN2

!KO_HFREQ

!KO_MRDMRC

!KO_CATCONT

Categorical into Contrast

Recoding of categorical variables into contrast variables. The macro creates, out of categorical or discrete quantitative variables, contrast variables of the requested type and, optionally, their interactions. It also returns matrices of contrast coefficients (L matrices). Contrasts are ways to quantify a categorical predictor (“factor”) to compare among groups, factor levels, or to test if factor levels form underlying continuity with (non)linear effect on the response. The mission of the macro is to produce contrasts physically: as variables in the dataset. You may use them as predictors in a plain regression procedure – i.e., such one not recognizing categorical predictors. The following contrast types you can obtain: indicator (= dummy variables), simple, deviation (= effect), Helmert, difference, repeated, polynomial, weighted polynomial, user-defined (by L matrix) contrast.

!KO_ACATBIN

!KO_ACATBIN2

!KO_HFREQ

!KO_FREQ

!KO_CATEG

MATRIX – END MATRIX functions

Generates matrix of random values from categorical distribution with specified parameters (number of categories k and their probabilities). Categorical distribution is multinomial distribution with number of trials 1.

!KO_CATWOR

!KO_SAMPLE

!KO_CATWOR

MATRIX – END MATRIX functions

Sample from categorical distribution without replacement. Collects random sample of n objects from a limited set of objects belonging to different categories. This function returns random values from a k-categorical distribution, like !KO_CATEG function, but it does sampling without replacement and from finite population. The actual probability of selection of an object of this or that category is determined by a relation between two probabilities – the “demand” (propensity to pop) and “availability” (presence in the population, or “stock”), and that probability changes dynamically as selection progresses, because it goes without return of objects into the population. There are several variants of the mentioned relation between demand and availability.

!KO_CATEG

!KO_SAMPLE

!KO_CCCRITM

Internal clustering criteria

Cubic clustering criterion, as !KO_CCCRITV, but input – matrix.

!KO_CCCRITV

!KO_CCCRITV

Internal clustering criteria

Internal clustering criteria: cubic clustering criterion (based on ANOVA); log det ratio (based on MANOVA). Cluster validity indices. Input – variables.

!KO_CCCRITM

!KO_CCM

MATRIX – END MATRIX functions

Comembership confusion matrix for two partitions. Comembership confusion matrix is such a 2×2 confusion matrix where the unit of count is a pair of objects (not an object). This matrix is the basis of assessment of similarity of two classifications (partitions) of the same objects.

!KO_CLASAGREE

!KO_CCUM

MATRIX – END MATRIX functions

Cumulative sums in columns. Takes a matrix and returns the matrix of the same size, which elements in each column are the cumulated sums in that column of the input matrix, by summation downward or upward.

!KO_CELLS

MATRIX – END MATRIX functions

Proportions and residuals in two-way contingency table. Returns table, row, or column proportions (percents); expected counts, frequency residuals, standardized and adjusted residuals.

!KO_CROSSTAB

!KO_CHITAB

!KO_CENTER

MATRIX – END MATRIX functions

Centering. Centers columns of data matrix (brings mean in them to 0).

!KO_ZSCORE

!KO_GCENTER

!KO_HRESC

!KO_CHGRAH

MATRIX – END MATRIX functions

SPSS realization of Graham algorithm to compute convex hull on a plane.

!KO_CHJARV

!KO_CHISQ

MATRIX – END MATRIX functions

Generates matrix of random values from chi-square distribution with specified degrees of freedom number.

!KO_CHITAB

MATRIX – END MATRIX functions

Chi-square statistic (Pearson and likelihood ratio) of two-way contingency table.

!KO_CROSSTAB

!KO_CELLS

!KO_SCHITAB

!KO_CHJARV

MATRIX – END MATRIX functions

SPSS realization of Jarvis algorithm to compute convex hull on a plane.

!KO_CHGRAH

!KO_CINDEX

Internal clustering criteria

Internal clustering criteria: C-index. Cluster validity index comparing within-cluster distances with the “absolute ideal” of such.

!KO_RPBCLU

!KO_CLASAGREE

Compare partitions

Comparison measures for “classification” partitions (a “partition” is a nominal variable). Computes measures of agreement (likeness) between partitions – indices known as classification agreement indices or measures of post-performance quality of classifiers. In comparison of this kind, the one-to-one correspondence between groups of the two being compared partitions is known, established. In other words, “group labels” matter and are identified. This typically is a comparison among classifications or between a ground truth partition and a predicted classification. The following indices for binary aka one-hot aka class-specific classification are available: accuracy (Rand, simple matching), recall (sensitivity, true positive rate), specificity (true negative rate), precision (positive predictive value), negative predictive value (NPV), Youden’s, markedness, F1 (F-measure, Dice), F-beta (generalized or weighted F-measure), Kulczynski 2, log diagnostic odds ratio, discriminant power, Matthews (Phi) correlation, balanced classification rate (point AUC), GM measure, adjusted GM measure, optimized precision, Jaccard (Tanimoto). You can select how to average a binary index across classes if you need single value for a multiclass partition. The following multiclass proper aka nominal classification indices are available: overall success rate (relative agreement, multiclass accuracy), Cohen’s kappa, Scott’s pi, Brennan-Prediger kappa, multiclass Matthews (Rk) correlation. 

!KO_CLUAGREE

!KO_CCM

!KO_PROXBIN

!KO_CLASSRES

MATRIX – END MATRIX functions

Percent of correct classification. Computes figures “Percent of correctly classified” for a classification frequency cross-table.

!KO_CROSSTAB

!KO_CLOSEST

MATRIX – END MATRIX functions

Find out the data value closest to a specified value by it size, from “below” or “above”.

!KO_CLR

MATRIX – END MATRIX functions

Centered logratio transform. Column sums are taken to 1; then the values are divided by the geometric mean in the column, and logarithm is taken. As a result, values in columns have zero means.

!KO_CLUAGREE

Compare partitions

Comparison measures for “clustering” partitions (a “partition” is a nominal variable). Computes measures of agreement (likeness) between partitions – indices known as external clustering criteria or supervised cluster validity indices. In comparison of this kind, the correspondence between groups of the two being compared partitions is not known or established. In other words, “group labels” are not required. This typically is a comparison among cluster solutions or between a ground truth partition and a cluster solution. The following indices based on the co-membership confusion matrix, aka object pairs measures, are available: Dice (F1-measure), Ochiai (Folkes-Mallows, cosine), Kulczynski 2, Jaccard, Sokal-Sneath 2, Sokal-Sneath 1, Rand (Simple Matching coefficient), Adjusted Rand, Russel-Rao, Rogers-Tanimoto, Phi correlation (normalized Hubert Г), dispersion, squared Euclidean distance (Hamming distance, and double of it is Mirkin distance), McNemar distance. The following indices based on frequency crosstabulation are available: overlap (purity), F clustering accuracy, homogeneity & completeness V, mutual information, variation of information distance, normalized mutual information, adjusted mutual information.

!KO_CLASAGREE

!KO_GRMATCH

!KO_PROXBIN

!KO_COMBK

MATRIX – END MATRIX functions

Returns combinations by k = 2, 3, ... elements (from one set).

!KO_ALLCOMB

!KO_COMBOPER

MATRIX – END MATRIX functions

Horizontal arithmetic operations in combinations of variables. The function considers all combinations of variables (data columns) by so much items in a combination, and computes in each combination their sum (or product, etc.) horizontally, within each case (row).

!KO_TURFLIKE

!KO_CONCDISC

MATRIX – END MATRIX functions

Counts of concordant, discordant, and tied pairs. For two scale or ordinal variables, returns quantities necessary to compute such association measures as Goodman-Kruskal Gamma, Somer's coefficient, Kendall correlation, etc.

!KO_CONCDISCT

!KO_CONCDISCT

MATRIX – END MATRIX functions

Counts of concordant, discordant, and tied pairs. Returns same quantities as !KO_CONCDISC, but computes them out of frequency cross-table rather than from data columns.

!KO_CONCDISC

!KO_CROSSTAB

!KO_CORR

MATRIX – END MATRIX functions

Square symmetric Pearson correlation matrix.

!KO_RECT

!KO_BIV

!KO_CORRCOV

MATRIX – END MATRIX functions

Converts correlation matrix into covariance one (or cosine similarity matrix into SSCP one).

!KO_COVCORR

!KO_SWDIAG1

!KO_CORRESP

MATRIX – END MATRIX functions

Simple correspondence analyzes a two-way contingency table. It is the biplot analysis in application to contingency table. You can select among the chi-square or a Euclidean pre-processing of the table. There is an option to make passive some rows and columns, and flexible endowing with inertia.

!KO_BIPLOT

!KO_COSINE

MATRIX – END MATRIX functions

Square symmetric matrix of cosine similarities (coefficient of proportionality aka Tucker's coefficient of congruence).

!KO_RECT

!KO_COUNT1

MATRIX – END MATRIX functions

Count values (exact match). Counts in data matrix rows the number of elements which match any of the values of the specified list.

!KO_COUNT2

!KO_COUNT2

MATRIX – END MATRIX functions

Count values in rows (hitting into range). Counts in data matrix rows the number of elements which lie in any of the specified value ranges.

!KO_COUNT1

!KO_COV

MATRIX – END MATRIX functions

Square symmetric covariance matrix.

!KO_COV2

!KO_RECT

!KO_BIV

!KO_COV2

MATRIX – END MATRIX functions

Square symmetric covariance matrix (on df=n).

!KO_COV

!KO_RECT

!KO_COVCORR

MATRIX – END MATRIX functions

Converts covariance matrix into correlation one (or SSCP matrix into cosine similarity one).

!KO_CORRCOV

!KO_SWDIAG1

!KO_CRONALPHA

MATRIX – END MATRIX functions

Cronbach’s alpha – one of measures of internal consistency (homogeneity)

!KO_MCDOMEGA

!KO_CROSSTAB

MATRIX – END MATRIX functions

Two-way frequency crosstabulation (for all values).

!KO_FREQ

!KO_CELLS

!KO_CHITAB

!KO_AGGRTAB

!KO_CTABVAL

!KO_CTABVAL

MATRIX – END MATRIX functions

Two-way frequency crosstabulation (for specified values).

!KO_CROSSTAB

!KO_CUMCLUG

Cumulative curves

Comparison of groups (by cluster analysis) according to the cumulative distridution in variables. Computes square matrix of distances (Manhattan, Chebyshev, or autocorrelative) that shows differences between specified groups of respondents in respect to cumulative distribution observed in the analyzed variables (the variables must be with discrete values). And builds, based on the matrix, the cluster dendrogram (agglomeration method: farthest neighbour), where one sees the said differences.

!KO_DABWFRD

MATRIX – END MATRIX functions

Averaged distances between groups (computation from dissimilarity matrix). Takes a distance (dissimilarity) matrix between data cases and a grouping of cases. Computes the average distances between the groups.

!KO_DATOFRD

!KO_ASSCLU

!KO_DATOFRD

MATRIX – END MATRIX functions

Averaged distances to groups (computation from dissimilarity matrix). Takes a distance (dissimilarity) matrix between data cases and a grouping of cases. Computes the average distance from each case to each group.

!KO_DABWFRD

!KO_POINTCLUD

!KO_DAVBOULM

Internal clustering criteria

Same as !KO_DAVBOULV, but input – matrix.

!KO_DAVBOULV

!KO_DAVBOULV

Internal clustering criteria

Internal clustering criteria: Davies-Bouldin (based on ANOVA); PBM (eclectic). Cluster validity indices. Input – variables.

!KO_DAVBOULM

!KO_DBWCFRD

MATRIX – END MATRIX functions

Distances between group centroids (computation from distance matrix). Takes a distance matrix between data cases and a grouping of cases. Computes the distances between group centroids.

!KO_DTOCFRD

!KO_AGGR

!KO_SEUCLID

!KO_ASSCLU

!KO_DBWFFRD

MATRIX – END MATRIX functions

Distances between group farthest neighbours (computation from dissimilarity matrix). Takes a distance (dissimilarity) matrix between data cases and a grouping of cases. Returns the distances between farthest neighbours between the groups.

!KO_DTOFFRD

!KO_ASSCLU

!KO_DBWNFRD

MATRIX – END MATRIX functions

Distances between group nearest neighbours (computation from dissimilarity matrix). Takes a distance (dissimilarity) matrix between data cases and a grouping of cases. Returns the distances between nearest neighbours between the groups.

!KO_DTONFRD

!KO_ASSCLU

!KO_DCENTER

MATRIX – END MATRIX functions

Double centering of matrix of squared distances. It is the “Euclidean geometric” way to convert distances between objects (the function takes the distances for sq. Euclidean) into similarities that are scalar products (between vectors let from the configuration’s centroid).

!KO_SDCOSTH

!KO_DENDRO

Clustering

Dendrogram. The macro builds/draws dendrogram according to an agglomeration schedule. (Agglomeration schedule is returned by macro !KO_HIECLU or !KO_HIECLUEX. But the user may input their own agglomeration schedule.)

!KO_HIECLU

!KO_HIECLUEX

!KO_DFS

MATRIX – END MATRIX functions

SPSS realization of depth-first search algorithm for a unipartite graph. May obtain full or truncated tree, as well as forest of trees.

!KO_BFS

!KO_DIAGBOFF

MATRIX – END MATRIX functions

Magnitudes of elements offset from matrix diagonal band. When a matrix is nonsquare, we may say it has more than one diagonal – the band of diagonals. The function marks all the diagonal band with zero, while other elements are marked with the magnitude of their distance (offset) from the band.

!KO_DIAGOFF

!KO_DIAGNS

MATRIX – END MATRIX functions

One of possible coefficients measuring the degree of concentration of large (by absolute magnitude) values near its main diagonal.

!KO_DIAGOFF

MATRIX – END MATRIX functions

Magnitudes of elements offset from matrix diagonal. Marks the diagonal of a matrix with zero, while other elements are marked with the magnitude of their distance (offset) from the diagonal. You may choose the diagonal.

!KO_DIAGBOFF

!KO_DIJKSTRA

MATRIX – END MATRIX functions

SPSS realization of Dijkstra algorithm of shortest path / easiest pass.

!KO_FLOWAR

!KO_BFS

!KO_DISCRIM

MATRIX – END MATRIX functions

Linear discriminant analysis (extraction of discriminant variates only, and without significance tests).

!KO_GACLASS

!KO_GACLASS2

!KO_CANCORR

!KO_DMATRIX

Matrix comparisons

Distances between columns of a proximity matrix.

!KO_DONRECI

Multiple Response tools

Cleaning of categorical multiple response set by other categorical variables with the same categories. If you have two sets of categorical variables with the same categories, you may add/remove/recode data of one set by consulting with the existing data of the other set, to put agreement between the sets.

!KO_DSALLCOMB

MATRIX – END MATRIX functions

Returns combinations by k = 2, 3, ... elements taken from different sets.

!KO_DSCOMBK

!KO_DSCOMBK

MATRIX – END MATRIX functions

Returns all combinations by k elements taken from different sets.

!KO_DSALLCOMB

!KO_DTOC

MATRIX – END MATRIX functions

Distances to group centroids. Takes a matrix of quantitative data and a grouping of cases. Computes the distance from each case to the centroid of each group.

!KO_DTOCFRD

!KO_DTOCFRD

MATRIX – END MATRIX functions

Distances to group centroids (computation from distance matrix). Takes a distance matrix between data cases and a grouping of cases. Computes the distance from each case to the centroid of each group.

!KO_DTOC

!KO_DBWCFRD

!KO_DTOMFRD

!KO_POINTCLUD

!KO_DTOFFRD

MATRIX – END MATRIX functions

Distances to group farthest neighbours (computation from dissimilarity matrix). Takes a distance (dissimilarity) matrix between data cases and a grouping of cases. Returns the distance from each case to its farthest neighbour in each group.

!KO_DBWFFRD

!KO_POINTCLUD

!KO_DTOMFRD

MATRIX – END MATRIX functions

Distances to group medoids (computation from dissimilarity matrix). Takes a distance (dissimilarity) matrix between data cases and a grouping of cases. Returns the distance from each case to the medoid of each group; and the medoids themselves (their indices).

!KO_DTOCFRD

!KO_POINTCLUD

!KO_DTONFRD

MATRIX – END MATRIX functions

Distances to group nearest neighbours (computation from dissimilarity matrix). Takes a distance (dissimilarity) matrix between data cases and a grouping of cases. Returns the distance from each case to its nearest neighbour in each group.

!KO_DBWNFRD

!KO_POINTCLUD

!KO_DUNN

Internal clustering criteria

Internal clustering criteria: Dunn (several types). Classic and “generalized” Dunn’s cluster validity index assesses cluster separation relative cluster size.

!KO_EDPROXMX

Various proximities

Editing of a proximity (distance, etc.) matrix. A tool to edit a square matrix where rows and columns should be the same set of items (i.e., the speech is of a unipartite graph). You can: (i) compile the matrix in any you want, still regular, order; (ii) extract a submatrix; (iii) do some operations inside the matrix body (for example, make asymmetric matrix symmetric, add a constant, transpose, set a diagonal, etc.); (iv) save out the diagonal or the unwrapped triangles of the matrix; (v) draw a heatmap of the matrix.

!KO_TRADD

!KO_TRMULT

!KO_TREXP

!KO_UNFTRI

!KO_SYMTRI1

!KO_SYMTRI2

!KO_EIG2X2

MATRIX – END MATRIX functions

Eigendecomposition of 2×2 matrix.

!KO_SCHUR2X2

!KO_ERRDISP

Multiple Response tools

Checking of data entry of DISPART type. An auxiliary macro for !KO_STRMRC, !KO_STRMRD.

!KO_STRMRC

!KO_STRMRD

!KO_FITCOV

Fit covariates

Fitting variables to a square symmetric matrix of coefficients. Iteratively modifies the input variables’ values so that the variables show the strength of relations with each other close or equal to coefficients of a user-specified matrix, correlation, covariance, or SSCP.

!KO_FITVAR

!KO_TOCOV

!KO_FITVAR

Fit covariates

Fitting variables to a rectangular matrix of coefficients. Transforms variables to achieve the needed values of association coefficients (correlation, covariance, or sums of cross-products). Unlike !KO_FITCOV, it fits variables to covarying not with each other but with other variables that will not be altered in any way by the macro.

!KO_FITCOV

!KO_YTOCOV

!KO_FLOWAR

MATRIX – END MATRIX functions

SPSS realization of Floyd-Warshall algorithm of shortest paths / easiest passes.

!KO_SFLOWAR

!KO_DIJKSTRA

!KO_FOLTRI

MATRIX – END MATRIX functions

Fold two vectors into the triangles of square matrix. This function performs the action that is opposite to what !KO_UNFTRI does.

!KO_UNFTRI

!KO_FREQ

MATRIX – END MATRIX functions

Frequencies of all values of one data column. And dummy variables corresponding to the values.

!KO_CROSSTAB

!KO_FREQVAL

!KO_UNIQUE

!KO_MRFREQ

!KO_ACATBIN

!KO_ACATBIN2

!KO_CATCONT

!KO_FREQVAL

MATRIX – END MATRIX functions

Frequencies of specified values in data columns.

!KO_FREQ

!KO_CTABVAL

!KO_COUNT1

!KO_FSC

MATRIX – END MATRIX functions

Factor score coefficients. Computes matrix of coefficients to obtain factor scores in factor analysis (or component scores in principal component analysis). The methods: regression (Thurstone), Horst, Bartlett, Anderson-Rubin and McDonald-Anderson-Rubin, Green.

!KO_PAF

!KO_PCA

!KO_GACLASS

MATRIX – END MATRIX functions

Gaussian classifier. Classifies observations to classes with normal or near-normal distribution. Used, in particular, as a part of discriminant analysis.

!KO_DISCRIM

!KO_GACLASS2

!KO_GACLASS2

MATRIX – END MATRIX functions

Gaussian classifier (with option "leave-one-out"). The function is similar to !KO_GACLASS, but classifies only by the rule derived from the input sample itself. On the other hand, it can classify by the “leave-one-out cross-validation” method.

!KO_DISCRIM

!KO_GACLASS

!KO_GAMMACLU

Internal clustering criteria

Internal clustering criteria: gamma statistic. It is the Goodman-Kruskal Gamma as an index of cluster validity.

!KO_GCENTER

MATRIX – END MATRIX functions

Centering, by groups. Centers columns of data matrix (brings mean in them to 0), by groups of cases.

!KO_CENTER

!KO_GCOV

MATRIX – END MATRIX functions

Covariance or correlation or scatter matrix computed by groups of cases, and their averaged (pooled) one.

!KO_COV

!KO_COV2

!KO_CORR

!KO_GDESCR

MATRIX – END MATRIX functions

For one variable: minimum, maximum, mean, and variance, by groups of cases and total.

!KO_MEAN

!KO_VARIANCE

!KO_GENCLU

Generate random clusters, mixtures

Generating random cluster/mixture data. Generates fuzzy (overlapping) or clear (demarcated) clouds of continuous data, uni- or multivariate. The clusters can be from normal or from more platykurtic (up to uniform) distribution, and can be round or elongated. You can manipulate cluster sizes and spacing between them, as well as their rotatedness in space.

!KO_ROTCLU

!KO_MVNORM

!KO_UNIFBALL

!KO_GOWER

Various proximities

Gower similarity. Computes square matrix of Gower similarity measure between data cases, based on any mixture of quantitative and categorical variables (scale, ordinal, binary, nominal, and count features). You can give weights to features, convert the similarity into a Gower distance, euclidize the distance matrix by Lingoes or Cailliez correction.

!KO_GREEDM

MATRIX – END MATRIX functions

Simple greedy matching of elements between two sets (e.g., parts in bipartite graph, rows and columns of a matrix) to maximize the sum of values in pairs.

!KO_GREEDM2

!KO_GREEDM2

MATRIX – END MATRIX functions

Simple greedy matching of elements between two sets (e.g., parts in bipartite graph, rows and columns of a matrix) to maximize the sum of values in pairs. For discrete data.

!KO_GREEDM

!KO_GRMATCH

Compare partitions

Identification (pairing) of matching groups. The macro establishes one-to-one corresponding groups between different partitions (a “partition” is a nominal variable). Corresponding or matching groups are those which consist majorily of the same objects (cases of the dataset). If you have partitions with such similar groups, but these are coded differently (have different “labels”) across the partitions, the procedure helps you identify them and, optionally, recode them to have uniform coding. (After the recoding, !KO_CLASAGREE could be applied to assess how much the partitions agree.) Matching of groups between the two being collated partitions can be done based on their crosstabulation’s raw counts, frequency residuals, or cell F-measures; and the matching can be via Hungarian or greedy algorithms.

!KO_CLUAGREE

!KO_GREEDM

!KO_HUNGAR

!KO_GSCALE

MATRIX – END MATRIX functions

Scaling, by groups. Scales (normalizes) columns of data matrix (brings sum of squares of values to 1 or to n), by groups of cases.

!KO_SCALE

!KO_GZSCORE

MATRIX – END MATRIX functions

Z-standardization, by groups. Standardizes columns of data matrix (brings mean in them to 0 and variance to 1), by groups of cases.

!KO_ZSCORE

!KO_HAT

MATRIX – END MATRIX functions

Influence matrix (hat matrix, projection matrix). Its diagonal values are known in regression as the leverages and are tied with Mahalanobis distances to centroid.

!KO_SMAHALC

!KO_DCENTER

!KO_HBINEF

Horizontal tools

Within cases: binning (quantizationj) into equal frequency, percentile groups. You can also create variables showing the cut-points, and the frequencies in the groups.

!KO_HRANK

!KO_HBINEI

Horizontal tools

Within cases: binning (quantizationj) into equal interval groups. You can also create variables showing the cut-points, and the frequencies in the groups. You may specify the cutting (into equal subranges) or let the macro define them automatically. The cutting can be made same or different for different dataset cases. You can also create variables showing the cut-points, and the frequencies in the groups.

!KO_HCOUNT

Horizontal tools

Within cases: count of unique values and duplicates. Creates 5 variables with these horizontal counts: (i) how many there are distinct values, (ii) how many values of these do not repeat (no duplicates) and (iii) how many do repeat (and you can optionally request more specifically how many times), (iv) and what are the maximal and (v) the minimal number of repetitions among the values. All valid values in the data are browsed, but you can narrow the scope of values to analyze or suggest their list.

!KO_HFREQ

!KO_VALVARS

!KO_HDIMPUTE

Impute missing data

Hot-deck imputation of missing values (thorough algorithm). Among options of the procedure: partial match on background variables; “at one” and “independent” processing of imputation variables; taking account of correlation between imputation variables.

!KO_HOTDECK

!KO_BORROW

!KO_HESS

MATRIX – END MATRIX functions

Hessenberg matrix / tridiagonal matrix. Turns a square matrix into the upper-triangular Hessenberg matrix with the upper subdiagonal also filled. If the matrix was symmetric, the tridiagonal matrix comes out.

!KO_HFREQ

Horizontal tools

Within cases: frequencies of values. Frequency of every unique valid value in the data will be counted up, but you can narrow the scope of values to analyze or suggest their list. Continuous values are rounded or truncated with the wanted precision. Output is a new dataset with a variable per each value counted, the data are the counts. Also, you can produce binary/dummy variables with this macro.

!KO_CATBIN

!KO_!ACATBIN

!KO_!ACATBIN2

!KO_MRCMRD

!KO_!AMRCMRD

!KO_!AMRCMRD2

!KO_VALVARS

!KO_FREQVAL

!KO_MRFREQ

!KO_HGAPS

Horizontal tools

Within cases: statistics of gaps between values in their variational series. A gap is the distance between two nonequal consecutive values in a quantitative data distribution. For each case of the dataset, the macro will consider its values ascending series and output descriptive statistics (n, min, max, mean, st. dev.) about the gaps there. Those can be useful in exploring outliers and the degree of data nonhomogeneity.

!KO_HIECLU

Clustering

Hierarchical cluster analysis (input – a square proximity matrix). Choose among 11 methods of agglomeration (linkage), including “flexible” average linkage methods. The macro has a number of valuable options expanding functionality: (i) cluster not just single objects but their groups (sometimes this is equivalent to frequency weighting); (ii) impose preexistent arbitrary cluster structure – to gather it first of all, before further agglomerating; (iii) stop agglomeration at any step, arbitrary or by a selected criterion, and save the remaining proximity matrix; (iv) only assign new objects to existent clusters, without agglomeration.

!KO_HIECLUEX

!KO_ASSCLU

!KO_DENDRO

!KO_HIECLUEX

Clustering

Hierarchical cluster analysis with exotic linkage methods (input – a square proximity matrix). This macro is fairly similar to !KO_HIECLU, but is dedicated to special agglomeration (linkage) methods: Hausdorff distance, modified Hausdorff distance, and point-centroid cross-distance.

!KO_HIECLU

!KO_ASSCLU

!KO_DENDRO

!KO_HIESORT

MATRIX – END MATRIX functions

Hierarchical sorting of rows in a matrix. Rows are sorted by values of the 1st column; within its identical values - by values of the 2nd column; within its identical values – by values of the 3rd column; etc.

!KO_SORT

!KO_RSORT

!KO_RSORTC

!KO_HOPCKARP

MATRIX – END MATRIX functions

SPSS realization of Hopcroft-Karp algorithm. Matching of elements between two sets (e.g., parts in bipartite graph) to maximize the number of links.

!KO_HUNGAR

!KO_HOTDECK

Impute missing data

Hot-deck imputation of missing values (quick algorithm). Faster but less flexible alternative to !KO_HDIMPUTE.

!KO_HDIMPUTE

!KO_BORROW

!KO_HQSORT

Horizontal tools

Within cases: quick sorting of values’ order, horizontally. This is a light (less options) but faster version of !KO_HSORT.

!KO_HSORT

!KO_SORT

!KO_RSORT

!KO_HRANK

Horizontal tools

Within cases: ranking of data. Available transforms: usual ranks (with 5 options to treat ties); normal scores (Blom, Tukey, rankit, Van der Waerden); equal-frequency bins (percentile groups).

!KO_HBINEF

!KO_HRESC

Horizontal tools

Within cases: rescaling, standardizing of data, etc. Available transforms: z-standardization, centration (deviation from mean) or from median, normalizing (scaling) to sum of squares 1 or to sum 1, taking range width to 1, rescaling to range [0,1], standardization with average absolute deviation, median standardization with average absolute deviation around median, median standardization with median absolute deviation around median, exponential normalization (softmax), centered logratio transform centering. There is an option to discterize (round or truncate with a wanted precision) values after transformation.

!KO_CENTER

!KO_ZSCORE

!KO_SCALE

!KO_RESCALE

!KO_NEF

!KO_CLR

!KO_HSORT

Horizontal tools

Within cases: sorting or randomization of values’ order, horizontally. You may choose to sort (or randomize) in each dataset case individually, or just in one case, other cases catched up in sorting being done in it. You can exclude some cases from participating in the procedure. In sorting, you have options to leave missings on their positions and to get rid of duplicate values.

!KO_HQSORT

!KO_SORT

!KO_RSORT

!KO_HUNGAR

MATRIX – END MATRIX functions

SPSS realization of the Hungarian (Kuhn-Munkres) algorithm. Matching of elements between two sets (e.g., parts in bipartite graph, rows and columns of a matrix) to maximize the sum of values in pairs.

!KO_HOPCKARP

!KO_HUNMATCH

!KO_HUNMATCH

Make Paired samples

Optimal pairing via Hungarian algorithm. Creation of matched-samples data to use in paired-samples analysis.

!KO_HUNGAR

!KO_ICCOW

MATRIX – END MATRIX functions

Different versions of Intraclass correlation coefficient (ICC) for one-way random design.

!KO_ICCOWB

!KO_ICCOWB

MATRIX – END MATRIX functions

Different versions of Intraclass correlation coefficient (ICC) for one-way random design. Classes are balanced.

!KO_ICCOW

!KO_IDC

MATRIX – END MATRIX functions

Square symmetric matrix of identity coefficients тождественности [Zegers, ten Berge].

!KO_IJ

MATRIX – END MATRIX functions

Returns position (pair of indices) of one element in a matrix, equal to a specified value. You can set the search order (priority) in case there exist more than one such element in the matrix.

!KO_INDX

!KO_RINDX

!KO_RANDINDX

!KO_IMAGE

MATRIX – END MATRIX functions

Image or anti-image covariance matrix. It gives multiple correlation coefficients and helps compute partial correlation coefficients in a set of variables.

!KO_INDIC

MATRIX – END MATRIX functions

Creates binary matrix indicating cases which are equal to the specified profiles of values.

!KO_INDICES

MATRIX – END MATRIX functions

Returns positions of nonzero elements of a vector.

!KO_INDICES2

!KO_INDICES2

MATRIX – END MATRIX functions

Returns positions of nonzero and positions of zero elements of a vector.

!KO_INDICES

!KO_INDICESM

MATRIX – END MATRIX functions

Returns positions of nonzero elements of a matrix (and optionally the elements themselves).

!KO_INDICES

!KO_RAM

!KO_VRAM

!KO_NZLIST


!KO_INDX

MATRIX – END MATRIX functions

Returns position of the first (leftmost) encounter of a specified value in row/rows.

!KO_RINDX

!KO_IJ

!KO_RANDINDX

!KO_INTLACE

Job tools

Interlacing of lists. One gimmick to aid work with syntax. You specify lists of some elements, and the macro interlaces the elements of the lists. For example, three lists (separated with ~): X1 X2 ~ Y1 Y2 ~ Z1 Z2 will be reordered into the list: X1 Y1 Z1 X2 Y2 Z2.

!KO_KMEANS

MATRIX – END MATRIX functions

Cluster analysis by k-means method. Partitions cases of scale data into the specified number of clusters. Initial centres must be offered by the user.

!KO_KMEANS

!KO_KMINI

Clustering

Initial centres for k-means clustering. The macro creates/selects, by various methods, initial centres for subsequent cluster analysis by k-means method. The methods: centroids of random subsamples, randomly selected points, farthest points (running selection), farthest points (simple selection), random farthest points (k-means++), group representative points, hierarchical clustering by Ward method.

!KO_KMEANS

!KO_KNNP

MATRIX – END MATRIX functions

K nearest neighbours (writing out), version "plus". Takes distances (dissimilarities) and returns, for each point, K nearest to it neighbours. In case the distances are discrete the result may be different from !KO_KNNR.

!KO_KNNR

!KO_KNNPRED

!KO_KNNPRED

MATRIX – END MATRIX functions

K-nearest neighbours analysis, with dependent variable, in its basic form (no tuning of K or selection of predictors).

!KO_KNNR

!KO_KNNP

!KO_KNNR

MATRIX – END MATRIX functions

K nearest neighbours (writing out), version "random". Takes distances (dissimilarities) and returns, for each point, K nearest to it neighbours. In case the distances are discrete the result may be different from !KO_KNNP.

!KO_KNNP

!KO_KNNPRED

!KO_KURTOSIS

MATRIX – END MATRIX functions

Kurtoses (tailedness) in the columns of data.

!KO_LIGAMMA

MATRIX – END MATRIX functions

Lower incomlete gamma function.

!KO_MCDOMEGA

MATRIX – END MATRIX functions

McDonald’s omega – one of measures of internal consistency (homogeneity)

!KO_CRONALPHA

!KO_MEAN

MATRIX – END MATRIX functions

Arithmetic means in the columns of data.

!KO_GDESCR

!KO_AGGR

!KO_MEDIAN

MATRIX – END MATRIX functions

Medians in the columns of data.

!KO_PTILE

!KO_MERGE

MATRIX – END MATRIX functions

Merging of two matrices. Into a matrix (“base”), all rows or columns of another matrix (“cut-in”) are inserted, forming the united matrix. Rows (columns) of the cut-in will occupy in it positions specified by the user.

!KO_SPLIT

!KO_MESTIM

MATRIX – END MATRIX functions

M-esimators of location (Huber’s, Andrew’s, Tukey’s).

!KO_ROBUSTADP

!KO_ROBUSTLTS

!KO_TRIMMEAN

!KO_MHTESTS

Marginal homogeneity

Marginal homogeneity tests for paired samples. Stuart–Maxwell and Bhapkar for nominal variables, Agresti for ordinal or discrete interval variables.

!KO_MRCMRD

Categorical - Binary recodings

Recoding of categorical multiple response set (MRC) into dichotomous multiple response set (MRD). Recodes categorical variables with a common pool of values into a series of binary variables forming a dichotomous multiple response set. The user must specify the values of interest. For each specified value, the binary variable will be created out of the input set of variables. There exists an option to account for repeating values within respondent (e.g., to create the variables as count).

!KO_AMRCMRD

!KO_RANKREV

!KO_HFREQ

!KO_MRDMRC

!KO_MRDMRC

Categorical - Binary recodings

Recoding of dichotomous multiple response set (MRD) into categorical multiple response set (MRC). Or recoding of dummy variables set into one categorical variable. The macro recodes a series of dichotomous variables or any other numeric variables communicating the status of a binary attribute (whether the attribute is present or not, or how many times it is present), into categorical variables.

!KO_MRCMRD

!KO_AMRCMRD

!KO_AMRCMRD2

!KO_CATBIN

!KO_ACATBIN

!KO_ACATBIN2

!KO_RAM

!KO_MRDNA

Multiple Response tools

Supplying dichotomous multiple response sets with “no answer” variable. This variable is the “negative” to the sum of all the rest variables in the set: it is 1 where they all are 0, and it is 0 otherwise.

!KO_MRFREQ

MATRIX – END MATRIX functions

Frequencies of all values in a “categorical multiple response set”. The function is like !KO_FREQ, but analyzes not one data column but multiple, comprehended as a set of variables with the common pool of categorical values. Returned also is the set of binary (or, count) variables corresponding to the categories; it is the “dichotomous multiple response set”.

!KO_FREQ

!KO_RAM

!KO_APRIORI

!KO_AMRCMRD

!KO_AMRCMRD2

!KO_MSPLIT

MATRIX – END MATRIX functions

Splitting of matrix horizontally in several, by groups. The function, useful for routine work, splits a data matrix in several, by groups of cases (rows). Input data rows must be already sorted by groups.

!KO_SPLIT

!KO_MVNORM

MATRIX – END MATRIX functions

Generates random data – n cases from normally distributed population with specified parameters: covariance matrix and centroid (the means).

!KO_NORMAL

!KO_WISHART

!KO_TOCOV

!KO_NBCLASS

MATRIX – END MATRIX functions

Naive Bayes classifier for categorical data.

!KO_NCARTP

MATRIX – END MATRIX functions

Cartesian product of n sets.

!KO_CARTP

!KO_NEF

MATRIX – END MATRIX functions

Exponential normalization (softmax function). In each column, values are transformed exponentially so that they lie in the range [0,1] and their sum is equal to 1.

!KO_NEIPLOT

Neighbourhood chains

Graph of neighbourhoods. The macro draws (in a text format) a tree-like directed graph (points and arrows between points) thus visualizing information of one or more “neighbourhood tables” output by !KO_NEITAB macro.

!KO_NEITAB

!KO_NEITAB

Neighbourhood chains

Table of neighbourhoods. The macro takes a square matrix of numbers which magnitudes show degree of some pairwise “affinity” within a set of objects, and modifies it into a “neighbourhood table” where, for each object, its neighbour is indicated (just one; it’s the nearest neighbour by default). A closed on itself chain of neighbours forms what is called here “heighbourhood”. In a neighbourhood, one can discern core objects, periferal and intermediate objects.

!KO_NEIPLOT

!KO_NORMAL

MATRIX – END MATRIX functions

Generates matrix of random values from standard normal distribution.

!KO_RVNORM

!KO_MVNORM

!KO_NZLIST

MATRIX – END MATRIX functions

Sparse matrix into list of nonzero values. Copies out from a matrix (or vector) all nonzero elements in one column, and appends another column to it containing the matrix column numbers from where the copied elements were taken from. Plus returns the information how many elements were copied from each matrix row.

!KO_NZUNLIST

!KO_INDICESM

!KO_NZUNLIST

MATRIX – END MATRIX functions

List into sparse matrix. Creates a (sparse) matrix by writing in values from a list into the empty matrix. This function performs the action that is opposite to what !KO_NZLIST does.

!KO_NZLIST

!KO_ORTROT

MATRIX – END MATRIX functions

Orthogonal analytic rotations. Performs orthogonal rotations which are frequantly used in factor analysis: varimax, quartimax, equamax, parsimax, facpars, or custom.

!KO_PAF

!KO_PROMAX

!KO_PCA

!KO_PAF

MATRIX – END MATRIX functions

Factor analysis by principal axes method (only factor extraction). Produces orthogonal factors’ loadings out of an association matrix (covariance, correlation, etc.). You must specify the number of factors.

!KO_PCA

!KO_ORTROT

!KO_PROMAX

!KO_FSC

!KO_PCA

MATRIX – END MATRIX functions

Principal component analysis (matrix input). Extracts principal components (loadings etc.) out of an association matrix (covariance, correlation, etc.). There is an option to give different weight to different variables.

!KO_PCOMP

!KO_PCOMP2

!KO_PCOORD

!KO_PAF

!KO_PCOMP

MATRIX – END MATRIX functions

Principal component analysis. Input are data. Results can be obtained in “raw” or “standardized” view.

!KO_PCOMP2

!KO_PCA

!KO_BIPLOT

!KO_PCOMP2

MATRIX – END MATRIX functions

Principal component analysis (for n<p). Same as !KO_PCOMP, but more suitable when the number of variables is greater than the number of cases.

!KO_PCOMP

!KO_PCA

!KO_PCOORD

MATRIX – END MATRIX functions

Principal coordinate analysis (Torgerson's metric multidimensional scaling) is a simplest method of multidimensional scaling, closely related to principal component analysis.

!KO_PCA

!KO_PLOTDIS

Plot latents

Showing discriminants on data scatterplot – as axes tiled with discriminant scores.

!KO_DISCRIM

!KO_PLOTPC

Plot latents

Showing principal components on data scatterplot – as axes tiled with component scores.

!KO_PCOMP

!KO_POINTCLUD

Clustering

Distances between objects and clusters (input – a square proximity matrix). Computes distances between objects and existing (user defined) clusters (or groups) of objects. Distances – to nearest or to farthest neighbours, average distances, distances to centroids or to medoids.

!KO_DTOCFRD

!KO_DATOFRD

!KO_DTOFFRD

!KO_DTONFRD

!KO_DTOMFRD

!KO_PRICECRVS

Cumulative curves

Price sensitivity curves (price sensitivity meter, PSM, after van Westendorp). Macro for a pricing research. Based on cumulative frequencies, it calculates and plots: categories of buyers and nonbuyers for different price levels; the four “price points” (IPP, OPP, PMC, PME); revenue. The data can be automatically cleaned; the analysis can be done by subsamples; the graphs can be smoothed.

!KO_CUMCLUG

!KO_PRIM

MATRIX – END MATRIX functions

SPSS realization of Prim's minimum spanning tree algorithm. The graph may be complete or sparse.

!KO_PRIME

MATRIX – END MATRIX functions

Highlights in each row and column of a matrix no more than one element equal to a specified value. (Note: this one-to-one pairing of rows with columns not necessarily maximizes the number of such pairs; use maximal matching algorithms for the maximization.)

!KO_HUNGAR

!KO_HOPCKARP

!KO_GREEDM

!KO_PROCR

MATRIX – END MATRIX functions

Orthogonal Procrustes rotation of one configuration of points into another, linked with it. With options of reflection and isoscaling.

!KO_PROCRUST

!KO_PROCRUST

Procrustes analysis

Orthogonal and nonorthogonal Procrustes analysis. Procrustes analysis for two configurations finds a way to maximally superpose two clouds of points in space, provided that a point in one cloud is designedly correspondent with a point in the other.

!KO_PROCR

!KO_PROD

MATRIX – END MATRIX functions

Product of elements of matrix. Multiplies among all elements of a matrix.

!KO_PROMAX

MATRIX – END MATRIX functions

Oblique rotation promax and promaj. Performs the named oblique rotations which are frequantly used in factor analysis.

!KO_ORTROT

!KO_PAF

!KO_PCA

!KO_PROPAG

MATRIX – END MATRIX functions

Propagates matrix rows in the number of (going adjacently) copies specified by the user. For different rows you may specify same or different number of copies. Number of copies 0 omits the row from the matrix.

!KO_PROXBIN

Various proximities

Various pairwise proximity measures for binary data. Computes square matrix of the requested similarity or distance/dissimilarity measure based on binary (1 vs 0) data. Computation of a proximity measure is possible between data cases or between variables (features). There is an option to rescale the computed similarity in various ways (e.g., correction for baseline independence, correction for the extreme value attainable). You can convert the obtained distances to similarities or vice versa. The following measures are available: (i) “Ordinal” or “one-pole” similarities considering match 1-1 but not match 0-0 to be the basis of affinity: Russel-Rao (simple joint probability), Jaccard (Tanimoto, community coefficient, similarity ratio), Dice (Czekanowski, Sorenson, identity or coincidence coefficient), Kulczynski 2, McConnaughey, Ochiai (cosine, Otsuka, Sorgenfrei), Fager's corrected cosine, Simpson (overlap), Braun-Blanquet (Savage), Sokal-Sneath measure 2, Kulczynski 1, Mountford, Forbes, Point mutual information (Gilbert-Wells) , Alroy (modified Forbes); (ii) “Nominal” or “two-pole” similarities considering both match 1-1 and match 0-0 to be the basis of affinity: Rand (simple matching, Sokal-Michener), Pearson chi-square, Yates corrected chi-square, Stiles, Contingency coefficient, Phi (Pearson) correlation, Doolittle, Pole-rescaled phi correlation (Cole’s C7), Tetrachoric correlation (Pearsonian approximate formula), Dispersion (covariance), Goodman-Kruskal lambda, Anderberg's D, Yule's association Q (Goodman-Kruskal gamma), Yule's colligation Y, Digby, Hamann, Rogers-Tanimoto, Sokal-Sneath measures 1 (Gower-Legendre), 3, 4 (Anderberg 2), 5 (Anderberg 1), Binary Gower, Goodman-Kruskal measure 1, Michael, Hawkins-Dotson, Tarwid, Dennis, Cohen's kappa (Adjusted Rand), Scott's pi, Loevinger (Benini), Cole, Maxwell-Pilliner, Fleiss, Eyraud, Gilbert; (iii) In-between “ordinal-nominal” similarities: Baroni-Urbani & Buser 1 and 2, Faith 1 and 2; (iv) Dissimilarities/distances: Euclidean, Squared Euclidean (Hamming), Chord, Hellinger, Lance-Williams (Bray-Curtis), Size difference (Baulieu), Shape difference, Pattern difference (Sneath), Q0 difference, Variance dissimilarity, McNemar distance; (v) Observed counts or Expected counts of matches 1-1, 1-0, 0-1, 0-0.

!KO_PROXQNT

!KO_PROXQNT

Various proximities

Various pairwise proximity measures for quantitative data. Computes square matrix of the requested similarity or distance/dissimilarity measure based on quantitative data (for example, scale or count/proportion; binary data are also allowed). Computation of a proximity measure is possible between data cases or between variables (features). You can select among various normalizations of data before the computations, convert the obtained distances to similarities or vice versa. The following measures are available: (i) Measures for data with any values: Euclidean distance, Manhattan (city-block) distance, Minkowski distance, Chebyshev (supremum) distance, Canberra distance/divergence, Clark distance, Cosine similarity (Tucker, Orchini) / Pearson correlation, Chord (Orloci) distance, Arc cosine distance, Sine dissimilarity, Identity coefficient (quantitative Dice) similarity, Similarity ratio (Kohonen, Jaccard), Aitchison distance; (ii) Measures for data with nonnegative values: Bray-Curtice distance (Czekanowski, Sorensen, Dice, F1, Renkonen, Motyka), Ellenberg similarity, Gleason similarity, Pandeya similarity, Kulczynski dissimilarity 1, Kulczynski dissimilarity 2, Soergel dissimilarity (Ruzicka, Jaccard), Hedges wave dissimilarity, Pinkham-Pearson similarity (with parameter 0 or 1), Roberts similarity, Intersection similarity, Morisita-Horn similarity, Harmonic mean similarity, Geometric mean similarity; (iii) Measures often used for probability vectors: Bhattacharyya distance and coefficient (fidelity), Hellinger (Matusita) distance and affinity, Chi-square distance for probabilities, Pearson/Neyman chi-square divergence, Kullback-Leibler asymmetric (Information gain) and symmetric divergence (Jeffreys divergence), K-divergence asymmetric and symmetric (Topsoe distance), Jensen difference (Information radius), Taneja distance; (iv) Measures often used to assess profile likeness: Penrose size difference, Scatter difference, Penrose shape distance, Standardized shape distance, Cattell pattern similarity, McCrae profile agreement, Intraclass correlation coefficient; (v) Measures which consider correlations: Mahalanobis (centered and noncentered) distance, Butler (centered and noncentered) distance.

!KO_PROXBIN

!KO_PTILE

MATRIX – END MATRIX functions

Requested percentiles in the columns of data. Several methods to compute.

!KO_MEDIAN

!KO_PWMINK

MATRIX – END MATRIX functions

Square symmetric matrix of powered weighted Minkowski distances. (Computes including Manhattan and Euclidean distances.)

!KO_PWMINKR

!KO_SEUCLID

!KO_PWMINKR

MATRIX – END MATRIX functions

Rectangular matrix of powered weighted Minkowski distances. (Computes including Manhattan and Euclidean distances.)

!KO_PWMINK

!KO_SEUCLIDR

!KO_QRDC

MATRIX – END MATRIX functions

QR decomposition of a matrix by Hausholder reflections method into the upper-triangular matrix R and the orthonormal matrix Q.

!KO_QREIG

MATRIX – END MATRIX functions

Eigendecomposition (Schur variant). Does eigendecomposition of a square matrix (symmetric or asymmetric) by the “Implicit QR iterations on recursively splitted Hessenberg matrix with double (Francis) shifts” method. “Schur variant” means the eigenvectors are computed to be orthogonal.

!KO_SCHUR2X2

!KO_RAM

MATRIX – END MATRIX functions

Ramming horizontally nonzero elements or their indices. Shifts all nonzero elements in each row of a matrix to left or right border, compacting them (no zeros will be among them). There is an option to operate not with the values themselves but with their indices (column numbers where they were). Plus an option to add randomization of order to the shifting.

!KO_VRAM

!KO_RANDINDX

MATRIX – END MATRIX functions

Returns position of random encounter of a specified value in row/rows. I.e., if there are several encounters, one of them is selected randomly.

!KO_INDX

!KO_RINDX

!KO_SAMPLE

!KO_RANKREV

Series Response tools

Converting variables with ranks into variables-ranks or back. Restructures data collected in ranking task between two modes of storage: variables-are-items/values-are-ranks and variables-are-ranks/values-are-items.

!KO_VALVARS

!KO_RATLAN

Internal clustering criteria

Internal clustering criteria: Ratkowsky-Lance. Cluster validity index based on ANOVA and chi-square; allows for a mix of scale and nominal variables.

!KO_AICBIC

!KO_READ

MATRIX – END MATRIX functions

Read inline data. This function (an aid in routine work) reads values offered by you within syntax and constructs matrix of them. For instance, rectangular matrix {1,2,3;4,5,6} can be created by writing the elements simply spaced: 1 2 3 4 5 6.

!KO_READ2

!KO_READ2

MATRIX – END MATRIX functions

Read inline data (no unquoting). This function is similar to !KO_READ.

!KO_READ

!KO_RECODE1

MATRIX – END MATRIX functions

Recode values (exact match). In a data matrix, replaces values of one specified list by corresponding values of another specified list. There is an option to filter cases for this procedure.

!KO_RECODE2

!KO_RECODE2

MATRIX – END MATRIX functions

Recode values (hitting into range). In a data matrix, replaces values falling into specified ranges “from…to” by corresponding values of a specified list. There is an option to filter cases for this procedure.

!KO_RECODE1

!KO_RECT

MATRIX – END MATRIX functions

Rectangular matrix of covariances/correlations/cosine similarities.

!KO_COV

!KO_COV2

!KO_CORR

!KO_COSINE

!KO_REGMRC

Multiple Response tools

Maintenance of a categorical multiple response set: letting it regular build, randomizing entry order, removing response duplicates, curing incompatible response conflicts, cropping away empty variables, merging sets.

!KO_REGRESS

MATRIX – END MATRIX functions

Simple or multiple linear regression (without significance tests).

!KO_CANCORR

!KO_RESCALE

MATRIX – END MATRIX functions

Linear rescaling. Rescales data to the needed magnitudes of the statistics: minimum, maximum, mean, st. deviation. You specify the values for any two of these four statistics, and the data will be brought to these magnitudes. For example, indicating min and max, you rescale the observed range into that one.

!KO_CENTER

!KO_ZSCORE

!KO_HRESC

!KO_RESCR

Various proximities

Rescaled Pearson correlation coefficient. The macro computes Pearson r between input variables and rescales its values relative the limit(s) that r could actually reach in conditions of the given data (i.e., under the marginal distributions observed). These actual limits most of the time are narrower than the theoretical bounds [-1,1]. Rescaling to one pole or to both poles are offered. If the matrix of rescaled r appear not positive definite, you can partly take back the modifying of the coefficients, to “cure” the matrix. You can also alter the values of input variables, making them to reproduce the rescaled coefficients.

!KO_TOCOV

!KO_RINDX

MATRIX – END MATRIX functions

Returns position of the last (rightmost) encounter of a specified value in row/rows.

!KO_INDX

!KO_IJ

!KO_RANDINDX

!KO_ROBUSTADP

MATRIX – END MATRIX functions

Outlier-robust statistics. Computes mean and std. deviation after exclusion of a specified proportion of most far-away extreme observations. Used is the method utilized in SPSS procedure Automated Data Preparation.

!KO_ROBUSTLTS

!KO_TRIMMEAN

!KO_MESTIM

!KO_ROBUSTLTS

MATRIX – END MATRIX functions

Outlier-robust statistics. Computes mean and std. deviation after exclusion of a specified proportion of most far-away extreme observations. Used is the Least Trimmed Squares method.

!KO_ROBUSTADP

!KO_TRIMMEAN

!KO_MESTIM

!KO_ROTCLU

Generate random clusters, mixtures

Random rotation of (cluster) data in space. Clusters of data can be rotated (about their centroids) independently or coherently, and also can rotate into their principal components.

!KO_GENCLU

!KO_RPBCLU

Internal clustering criteria

Internal clustering criteria: point-biserial correlation; McClain-Rao. Cluster validity indices comparing within-cluster and between-cluster distances between objects.

!KO_CINDEX

!KO_RSORT

MATRIX – END MATRIX functions

Sorting of rows in a matrix by values of its indicated column.

!KO_SORT

!KO_RSORTC

!KO_HIESORT

!KO_RSORTC

MATRIX – END MATRIX functions

Sorting of rows in a matrix by values of an external column.

!KO_SORT

!KO_RSORT

!KO_HIESORT

!KO_RUNS

MATRIX – END MATRIX functions

Highlight direct chains. In a binary matrix, highlights direct chains of 1s going in succession. One may choose how to highlight elements of chain of a specific length (for example, 1 1 1 1 to mark as 2 2 2 2 or 3 3 3 3  or 4 4 4 4 or 1 2 3 4).

!KO_RUNS2

!KO_RUNS2

MATRIX – END MATRIX functions

Highlight direct chains (another algorithm). This function is similar to !KO_RUNS.

!KO_RUNS

!KO_RVNORM

MATRIX – END MATRIX functions

Generates random values from normal distribution with specified parameters (means and standard deviations).

!KO_NORMAL

!KO_RVUNIF

MATRIX – END MATRIX functions

Generates random values from continuous uniform distribution with specified parameters (minimums and maximums).

!KO_SAMPLE

MATRIX – END MATRIX functions

Selects randomly and in random order n different numbers from numbers 1,2,...,k. This function is convenient for forming a random subsample ("without replacement") from a dataset, and also for random sorting of cases in a dataset.

!KO_CATWOR

!KO_SORT

!KO_RANDINDX

!KO_SBUTLER

MATRIX – END MATRIX functions

Square symmetric matrix of squared Butler distances. It is (squared) Euclidean distances in oblique coordinate system (the angles between axes may relate correlations, for example). Mahalanobis distances are also computable with this function.

!KO_SEUCLID

!KO_SMAHAL

!KO_SCALE

MATRIX – END MATRIX functions

Scaling to SS=1. Scales (normalizes) columns of data matrix (brings sum of squares of values to 1).

!KO_ZSCORE

!KO_ZSCORE2

!KO_GSCALE

!KO_HRESC

!KO_SCHI2C

MATRIX – END MATRIX functions

Input data matrix with NC number of columns should contain nonnegative values which are treated as counts (frequencies). For each pair of rows, that is, for their 2×NC frequency cross-table, the function computes the Pearson chi-square (or phi-square) statistic. It can be seen as a dissimilarity measure between the two rows: the (squared) chi-square distance. The square matrix of distances is returned. This is one of proximity measures between count data.

!KO_SCHITAB

MATRIX – END MATRIX functions

Matrix of squared chi-square distances between rows in contingency table. The chi-square distance is the weighted euclidean distance which, in particular, the Correspondence analysis tries to map in a space of reduced dimensionality.

!KO_CROSSTAB

!KO_CORRESP

!KO_SCHUR2X2

MATRIX – END MATRIX functions

Eigendecomposition of 2×2 matrix (Schur variant). “Schur variant” means the eigenvectors are computed to be orthogonal.

!KO_EIG2X2

!KO_QREIG

!KO_SDCOSTH

MATRIX – END MATRIX functions

Converting matrix of angular similarities into squared distances by the cosine theorem. It is the “Euclidean geometric” way to convert similarities between objects (the function takes the similarities for scalar products) into distances. Diagonal values of the input matrix are used as squared deviations of the objects (vector ends) from point 0 of the space.

!KO_DCENTER

!KO_SEQSIM

Compare sequences

Comparing of sequences (or documents), and their similarity measure. The macro compares, in pairs, sequences of some elements (“words”) and computes a similarity measure. You can compare the inputs as compositions of “words” – simply as documents, paying no attention to the order in them. But you can request to take into account the order of adjacent, successive “words”, – thus comparing the inputs as sequences. Additionally, you can take into account overall coordination of parts – whether same content pieces occupy the same places within the documents. Also, you can set differential relevance to “words”, and their “synonymy”. And you can physically extract longest common chain. The similarity the macro scores – is derived out of the fixed co-occurrence matrix of “words” defined by the two being compared sequences/documents. It is the macro’s approach. You can choose the method to score similarity with: greedy or Hungarian maximal matching, (simple) maximal aligning, maximal common chain, and some simpler scoring methods. The similarity score can be normalized into a similarity coefficient various ways.

!KO_SLANT

!KO_SLANT2

!KO_GREEDM

!KO_GREEDM2

!KO_HUNGAR

!KO_DIAGOFF

!KO_DIAGBOFF

!KO_SETDO

MATRIX – END MATRIX functions

Dyadic set operations. For two sets of elements, returns their union, intersection, difference, or symmetric difference.

!KO_SEUCLID

MATRIX – END MATRIX functions

Square symmetric matrix of squared Euclidean distances.

!KO_SEUCLIDR

!KO_PWMINK

!KO_SEUCLIDR

MATRIX – END MATRIX functions

Rectangular matrix of squared Euclidean distances.

!KO_SEUCLID

!KO_SFLOWAR

MATRIX – END MATRIX functions

SPSS realization of Floyd-Warshall algorithm of shortest paths / easiest passes (symmetric matrix).

!KO_FLOWAR

!KO_SHIFT

MATRIX – END MATRIX functions

Shift rows horizontally. Displaces rows of elements in a matrix to the right or left relative each other, by the amounts specified.

!KO_SILDEV

Internal clustering criteria

Silhouette statistic of type “deviation” (aka “simplified”) for the case: input – variables.

!KO_SILHOU

!KO_SILHOU

Internal clustering criteria

Internal clustering criteria: silhouette statistic (several types). Cluster validity index assessing, by distances, justification of that each object is enrolled in the cluster it enrolled, and not in another, nearest one.

!KO_SILDEV

!KO_SIMR

MATRIX – END MATRIX functions

Square symmetric matrix of similarity ratio coefficients aka Kohonen similarity.

!KO_SKEWNESS

MATRIX – END MATRIX functions

Skewnesses (asymmetry) in the columns of data.

!KO_SLANT

MATRIX – END MATRIX functions

Highlight slant chains. In a binary matrix, highlights slant (top-left to bottom-right or top-right to bottom-left) chains of 1s going in succession. One may choose how to highlight elements of chain of a specific length (for example, 1 1 1 1 to mark as 2 2 2 2 or 3 3 3 3  or 4 4 4 4 or 1 2 3 4).

!KO_SLANT2

!KO_SLANT2

MATRIX – END MATRIX functions

Highlight slant chains (another algorithm). This function is similar to !KO_SLANT.

!KO_SLANT

!KO_SMAHAL

MATRIX – END MATRIX functions

Square symmetric matrix of squared Mahalanobis distances.

!KO_SEUCLID

!KO_SBUTLER

!KO_SMAHALC

MATRIX – END MATRIX functions

Vector of squared Mahalanobis distances to centroid. Also, the distance between two groups (their centroids) from one population can be obtained.

!KO_SMAHAL

!KO_SORT

MATRIX – END MATRIX functions

Sorting of elements in a vector by their values.

!KO_RSORT

!KO_RSORTC

!KO_HIESORT

!KO_SPLIT

MATRIX – END MATRIX functions

Splitting of matrix into two. From a matrix, either its rows or its columns with indices specified by the user are cut out, forming the cutting matrix. The remaining rows (columns) form the remnant matrix.

!KO_MERGE

!KO_INDICES2

!KO_MSPLIT

!KO_SRSREF

Series Response tools

Manual data entry of a question like “select, then rate selected items” poses a problem: one has to search for the variable where to enter the rating datum. There are faster ways to enter such data – in a condensed way. The macro will unpack such compressed entry of ratings into variables-items ready for analysis.

!KO_DERAND

!KO_SSWFRD

MATRIX – END MATRIX functions

Within-group sums of squares of deviations (computation from distance matrix). Takes a distance matrix between data cases and a grouping of cases. Computes the sums of squares of deviations within groups.

!KO_GCOV

!KO_BWSCAT

!KO_AGGR

!KO_STRMRC

Multiple Response tools

Deploying of string variable into categorical multiple response set. If you’ve entered responses for multiple response question in a single string variable, the macro creates the set of categorical variables ready for analysis.

!KO_STRMRD

!KO_ERRDISP

!KO_STRMRD

Multiple Response tools

Deploying of string variable into dichotomous multiple response set. If you’ve entered responses for multiple response question in a single string variable, the macro creates the set of binary variables ready for analysis.

!KO_STRMRC

!KO_ERRDISP

!KO_SWCENTR

MATRIX – END MATRIX functions

Switching MSCP matrix onto new data centroid. MSCP matrix is SSCP matrix divided by the sample size n. Covariance matrix is MSCP matrix after the data centroid was transferred onto point 0 (centering). With this function, one can, for example, convert a covariance matrix into the “raw” (before-centering) MSCP matrix, having no data, but having just coordinates of the centroid (i.e., the mean).

!KO_SWDIAG1

MATRIX – END MATRIX functions

Switching matrix of similarities between objects (which the function takes for scalar products, e.g. covariances, correlations or cosines) onto a new diagonal – preserving angles between the object vectors at that. With this function one can, for example, turn a covariance matrix into a correlation or vice versa.

!KO_COVCORR

!KO_CORRCOV

!KO_SWDIAG2

!KO_SWDIAG2

MATRIX – END MATRIX functions

Switching matrix of similarities between objects (which the function takes for scalar products, e.g. covariances, correlations or cosines) onto a new diagonal – preserving distances between the objects at that.

!KO_SWDIAG1

!KO_SYMTRI1

MATRIX – END MATRIX functions

Symmetrization of square matrix: replace the upper triangle by the lower or the lower by the upper.

!KO_SYMTRI2

!KO_SYMTRI2

MATRIX – END MATRIX functions

Symmetrization of square matrix: replace greater element by lesser or lesser by greater, in each pair of symmetric elements.

!KO_SYMTRI1

!KO_TETRACH

Various proximities

Computes matrix of tetrachoric correlation coefficients (Pearsonian approximation) between binary variables. [Old macro. !KO_PROXBIN computes this coefficient too.]

!KO_PROXBIN

!KO_TOCOV

MATRIX – END MATRIX functions

Transform variables exactly to have specified covariances. Transforming so that the observed covariances or correlations between the variables become exactly equal to the user-specified ones.

!KO_YTOCOV

!KO_MVNORM

!KO_FITCOV

!KO_TRADD

MATRIX – END MATRIX functions

Add a constant to elements of a matrix upper or lower triangle.

!KO_TRMULT

!KO_TREXP

!KO_TREXP

MATRIX – END MATRIX functions

Exponentiate elements of a matrix upper or lower triangle by a constant.

!KO_TRADD

!KO_TRMULT

!KO_TRIMMEAN

MATRIX – END MATRIX functions

Trimmed mean.

!KO_ROBUSTADP

!KO_ROBUSTLTS

!KO_MESTIM

!KO_TRINEQ

MATRIX – END MATRIX functions

Check triangular inequality in dissimilarity matrix. In a square matrix of distances (dissimilarities), verifies if there are distances violating the (strict or slack) “axiom of triangular inequality”.

!KO_TRMULT

MATRIX – END MATRIX functions

Multiply elements of a matrix upper or lower triangle by a constant.

!KO_TRADD

!KO_TREXP

!KO_TRSUM

MATRIX – END MATRIX functions

Sum of above-diagonal or below-diagonal elements of matrix. Sums up elements of the upper or the lower triangle of a matrix.

!KO_TURFLIKE

MATRIX – END MATRIX functions

The function computes some quantities on the base of horizontal sums or means in combinations of variables (columns). As a particular case, it can help do the so-called TURF analysis.

!KO_COMBOPER

!KO_UNFTRI

MATRIX – END MATRIX functions

Unfold the triangles of a square matrix into vectors. Vectorizes both triangles, gives the indices memo, and also the indices helping to instantly vectorize likewise any matrix of the same size.

!KO_FOLTRI

!KO_UNIFBALL

MATRIX – END MATRIX functions

Normal cloud into uniform ball. The function reduces data kurtosis, pulling in – by this or that amount specified by the user – the periphery (tails of the distribution). The function expects that the input data are from normal distribution with the identity covariance matrix. In this case, one can turn a normat round cloud into a uniformly distrubuted (hyper)ball.

!KO_NORMAL

!KO_UNIFORM

Regular clouds

Clouds based on uniform distribution grid.

!KO_UNIFBALL

!KO_UNIQUE

MATRIX – END MATRIX functions

List of unique (distinct) values of vector and position of their first occurrence.

!KO_FREQ

!KO_VALVARS

Series Response tools

The macro is intended for tasks of the form “translate values into variables, variables into values”: if Vari=Valj, then create NewVarj=NewVali. It is a more general, than !KO_RANKREV, macro, designed not only for ranking data and offereing more possibilities.

!KO_RANKREV

!KO_HFREQ

!KO_HCOUNT

!KO_VARIANCE

MATRIX – END MATRIX functions

Variances in the columns of data.

!KO_GDESCR

!KO_AGGR

!KO_VARIANCE2

MATRIX – END MATRIX functions

Variances (on df=n) in the columns of data.

!KO_AGGR

!KO_VARTOCAS

MATRIX – END MATRIX functions

Restructuring “variables into cases”, or “wide into long format”. Reshaps each group of K variables (data columns) into single column. This way each case (row) gets broken in K rows.

!KO_CASTOVAR

!KO_VAT

MATRIX – END MATRIX functions

Block-diagonalization by VAT/IVAT method (Bezdek, Hathaway, 2002; Havens, Bezdek, 2012) reorders rows/columns of square distance matrix to concentrate small distances near the diagonal. If to render a block-diagonalized matrix on the “heatmap”, one can get an impression about the presence of cluster structure in the data and to estimate tentatively the number of clusters.

!KO_BLOCKDIAG

!KO_VRAM

MATRIX – END MATRIX functions

Ramming vertically nonzero elements or their indices. This function is like !KO_RAM, but shifts elements vertically, not horizontally.

!KO_RAM

!KO_WEIGR

Frequency weighting

Weighting groups. Performs univariate weighting (aka “cell” weighting by one variable or by combination of several ones) or multivariate weighting (“rim” aka “raking”) of cases in the dataset. The user specifies the wanted sizes (proportions or counts) for the groups of cases (respondents), and the macro computes the weight variable and weights the dataset by it. The target total sample size can be kept initial or set any user-specified. You can do weighting separately by some subsamples in parallel, or to make use of initial, background weights. Also, the macro has an option to set restriction on weight change for individual cases or subgroups.

!KO_WHITE

MATRIX – END MATRIX functions

Whitening (sphering) matrix. Whitening or sphering is transforming multivariate data such that their covariance matrix becomes the identity matrix (i.e., variables are decorrelated and standardized). The function obtains, from a covariance or correlation matrix, the “whitening” matrix which will fulfill you such transformation. There are several methods to compute that matrix (PCA whitening, ZCA whitening, Cholesky whitening).

!KO_PCOMP

!KO_PCA

!KO_PROCR

!KO_WISHART

MATRIX – END MATRIX functions

Random matrix from Wishart distribution. Returns covariance matrix which is a random realization of a specified population covariance matrix, under the condition of specified sample size n. Distribution in the population is assumed normal.

!KO_MVNORM

!KO_YTOCOV

MATRIX – END MATRIX functions

Transform a variable exactly to have specified covariances with other variables. Transform a variable so that its observed covariances or correlations with some “external” variables become exactly equal to the user-specified ones.

!KO_TOCOV

!KO_FITVAR

!KO_ZSCORE

MATRIX – END MATRIX functions

Z-standardization. Standardizes columns of data matrix (brings mean in them to 0 and variance to 1).

!KO_ZSCORE2

!KO_CENTER

!KO_SCALE

!KO_GZSCORE

!KO_HRESC

!KO_ZSCORE2

MATRIX – END MATRIX functions

Z-standardization (df=n). Standardizes columns of data matrix (brings mean in them to 0 and variance to 1). The standardizing st. deviation is computed on df=n.

!KO_ZSCORE

!KO_SCALE