Keywords - Function groups - @ A B C D E F G H I J K L M N O P Q R S T U V W X Y Z

Library: xclust
See also: conting measure contmax pswap agglom

Macro: recode
Description: allocates categories 1,2,...,L to intervalls of categories. The upper bounds of the intervals have to be specified. It is an useful tool in order to join classes and hence to collaps contingency tabels.

Usage: u = recode(c, p)
Input:
c l x 1 matrix of upper bounds (cutpoints) of intervals according to p
p n x 1 matrix of categories (positive integers 1,2,...,K) which have to be recoded into a smaller number of integers 1,2,...,l
Output:
u n x 1 matrix containing the new categories of p

Example:
; load the library xclust
library ("xclust")
p = #(2, 1, 3, 4, 3, 2, 1, 4, 5, 4, 3, 2, 4, 1, 1, 2, 1, 4, 5)
c = #(2, 4, 5)
recode(p,c)
Result:
Content of object u
[1,]       46 
[2,]       43 
[3,]       28 

Library: xclust
See also: conting measure contmax pswap agglom

Keywords - Function groups - @ A B C D E F G H I J K L M N O P Q R S T U V W X Y Z

Author: Hans-Joachim Mucha, 94111 Sigbert Klinke, 970902
(C) MD*TECH Method and Data Technologies, 17.8.2000