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: xplore
See also: xdiag diag

Macro: xdiagp
Description: Calculates the diagonal elements of a projection matrix.

Usage: d = xdiagp (x)
Input:
x n x p matrix
w optional, scalar or n x 1 weight vector
Output:
d n x 1 vector of diagonal elements of X(X'WX)^(-1) X' or W'^(1/2)X(X'WX)^(-1) X'W^(1/2)

Example:
library("xplore")
n=10
x=(1:n)~matrix(n)
xdiagp(x)
Result:

Contents of d
[ 1,]  0.34545 
[ 2,]  0.24848 
[ 3,]  0.17576 
[ 4,]  0.12727 
[ 5,]  0.10303 
[ 6,]  0.10303 
[ 7,]  0.12727 
[ 8,]  0.17576 
[ 9,]  0.24848 
[10,]  0.34545  

Library: xplore
See also: xdiag diag

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: TTK, 961127; Marlene Mueller, 970930
(C) MD*TECH Method and Data Technologies, 28.6.1999