| Library: | glm |
| See also: | glmbilo glmbipro glmnoid glmest glmstat eigsm |
| Macro: | glmdiagh | |
| Description: | glmdiagh calculates the diagonal elements of the 'hat' matrix |
| Usage: | h = glmdiagh(bv,x{,w}) | |
| Input: | ||
| bv | p x p matrix, the estimated covariance matrix for the coefficients. | |
| x | n x p matrix, the matrix of (observed) regressor variables. | |
| w | optional, n x 1 matrix, the weights used to estimate the coefficients. | |
| Output: | ||
| h | n x 1 matrix, the diagonal elements of the `hat' matrix: W'^(1/2)X(X'WX)^(-1) X'W^(1/2). | |
library("glm")
n = 100
b = 2|(-1)
x = normal(n,rows(b))
m = ceil(uniform(n).*5)
{y,p} = genbilo(x,b,m)
opt=glmopt("wx",m)
l = glmbilo(x,y,opt)
h = glmdiagh(l.bv,x,l.w)
Vector of diagonal elements of the hat matrix.
| Library: | glm |
| See also: | glmbilo glmbipro glmnoid glmest glmstat eigsm |