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: metrics
See also: hhtest glmmultlo genmultlo

Quantlet: hhmult
Description: hhmult calculates the H-H statistic to jointly test the specification of the link functions of a polychotomous response model (such as the conditional logit model or the multinomial logit model)

Reference(s):

Usage: {t,p} = hhmult (vhat,y,yhat,h)
Input:
vhat n x M matrix containing the projected indices
y n x M matrix containing n observ. of M binary dependent variables
yhat n x M matrix with the predicted probabilities P(Y_m=1|x)
h 1 x M vector of bandwidths
Output:
t scalar, the value of the test statistic
p scalar, the p-value of t, i.e. 1 - cdfc(t,M)

Example:



library("glm") 

library("metrics") 

n = 100

b = (1|2)~(-1|0)~(1|1)

x = normal(n,rows(b))

y = genmultlo(x,b)

ml = glmmultlo(x,y)

vhat=   x*ml.b

y1   =  y.=1

y2   =  y.=2

y3   =  y.=3

y   =   y1~y2~y3

c1  =   cols(vhat)

h   =   matrix(c1)' 

yhat=   ml.mu

{t,p}=   hhmult(vhat,y,yhat,h)

t~p

Result:

test statistic, t, and p-value, p.


Library: metrics
See also: hhtest glmmultlo genmultlo

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: AKW,960916
(C) MD*TECH Method and Data Technologies, 21.9.2000