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: aerlb lpdist distance

Macro: discrim
Description: computes the discrimination function for an obs x given samples x1 and x2

Usage: d = discrim(x1, x2, x)
Input:
x1 n1 x p matrix (sample 1)
x2 n2 x p matrix (sample 2)
x p x 1 vector (the obs to be classified)
Output:
d 1 x 2 vector (the distance to the two samples) Note It is assumed that both samples have identical cov structure

Example:
library("xplore")
library("xclust")
x1 = normal(100, 2)
x2 = normal(100, 2) + 0.8
x   = normal(2) + 0.6   	
d   = discrim(x1, x2, x)
d
Result:

[1,] 0.720965 0.030024 

Library: xclust
See also: aerlb lpdist distance

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: Wolfgang Härdle, 980221
(C) MD*TECH Method and Data Technologies, 17.8.2000