check.HLP {cta}R Documentation

HLP Link Status Check

Description

Checks whether the link function L(\cdot) is a candidate HLP link function.

Specifically, this program checks whether L(\cdot) satisfies certain necessary conditions that follow from a sufficient condition for HLP link status.

If the necessary conditions are satisfied then there is corroborating evidence that L(\cdot) has HLP link status. If the necessary conditions are not satisfied, then the sufficient condition for HLP link status is not satisfied, so L(\cdot) may or may not have HLP link status.

Usage

check.HLP(L.fct, Z, tol = NULL)

Arguments

L.fct

An R function object, indicating the link L(\cdot) for HLP link status check.

Z

Population (aka strata) matrix Z.

tol

The pre-set tolerance with which norm(diff) is to be compared with.

Details

The main idea:

The model L(m) = X\beta is an HLP model if L(\cdot) is a smooth link function that satisfies the HLP conditions with respect to Z (i.e. strata s) and X. That is,

Here, (1) L(\cdot) has HLP link status with respect to Z if, for m = Diag(Z\gamma)p, equivalently, for \gamma = Z'm and p = Diag^{-1}(ZZ'm)m,

N.B. Lang (2005) defined HLP models as those satisfying (1)(a) and (2). mph.fit uses a broader definition of HLP model. Specifically, models satisfying (1)(b) and (2) or (1)(c) and (2) are also considered HLP models.

Conditions (1)(b) and (2) can be checked using the check.homog function. Condition (1)(c) is not checked.

This function, check.HLP, is concerned with sufficient condition (1)(a) only. If L(\cdot) satisfies (1)(a) then

Here p_{i} = Diag^{-1}(ZZ'm_{i})m_{i}, where m_{i} = Diag(Z\gamma_{i})p_{i}, i = 1, 2.

This program randomly generates g1 (\gamma_{1}), g2 (\gamma_{2}), p1, p2, and computes norm(diff) = sqrt(norm(diff1)^2 + norm(diff2)^2). It returns a warning if norm(diff) is too far from 0.

Value

check.HLP returns a character string chk. If chk = "", then there is corroborating evidence that L(\cdot) has HLP link status. If chk = paste("L(m) may not be an HLP link [based on tol=",tol,"]!"), then the sufficient condition for HLP link status is not satisfied, so L(\cdot) may or may not have HLP link status.

Author(s)

Joseph B. Lang

References

Lang, J. B. (2004) Multinomial-Poisson homogeneous models for contingency tables, Annals of Statistics, 32, 340–383.

Lang, J. B. (2005) Homogeneous linear predictor models for contingency tables, Journal of the American Statistical Association, 100, 121–134.

See Also

mph.fit, check.homog, check.zero.order.homog

Examples

# 3-by-3-by-3 Table.
# For a description of the model, see Michael Haber's Example 2,
# p. 433, in  Biometrics (in Shorter Communications), Vol. 42,
# No. 2. (Jun., 1986), pp. 429-435.
A <- gl(3, 9, 27)
B <- gl(3, 3, 27)
C <- gl(3, 1, 27)
MAB <- kronecker(diag(9), matrix(1, 1, 3))
MAC <- kronecker(diag(3), kronecker(matrix(1, 1, 3), diag(3)))
MBC <- kronecker(matrix(1, 1, 3), diag(9))
M <- rbind(MAB, MAC, MBC)
Mr <- M[-c(3, 6, 7, 8, 9, 12, 15, 16, 17, 18, 21, 24,
           25, 26, 27), ]
C <- c(1, -1, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0,
       0, 0, 0, 0, 1, -1, -1, 1, 0, 0, 0, 0,
       0, 0, 0, 0, 0, 0, 0, 0, 1, -1, -1, 1)
C <- matrix(C, 3, 12, byrow = TRUE)
L.fct <- function(m) {
  p <- m / sum(m)
  C %*% log(Mr %*% p)
}
Z <- matrix(rep(1, 27), ncol = 1)
check.HLP(L.fct, Z)

[Package cta version 1.3.0 Index]