check.zero.order.homog {cta}R Documentation

Zero-Order Z Homogeneity Check

Description

Checks whether the estimand function S(\cdot) is zero-order Z homogeneous.

Usage

check.zero.order.homog(S.fct, Z, tol = 1e-9)

Arguments

S.fct

An R function object, indicating the estimand function S(\cdot) for zero-order Z homogeneity check.

Z

Population (aka strata) matrix Z.

tol

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

Details

The main idea:

S(\cdot) is zero-order Z homogeneous if S(Diag(Z\gamma) x) = S(x), for all \gamma > 0, and for all x within its domain. This program randomly generates gam (\gamma) and x (x), and computes

\texttt{diff.LRHS} = S(Diag(Z\gamma) x) - S(x).

It returns a warning if norm(diff.LRHS) is too far from 0.

Value

check.zero.order.homog returns a character string check.result that states whether S(\cdot) is zero-order Z homogeneous. If check.result = "", it means that we cannot state that S(\cdot) is not zero-order Z homogeneous based on the result of the check.

Author(s)

Qiansheng Zhu

References

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

See Also

check.homog, check.HLP

Examples

# EXAMPLE 1
S.fct <- function(m) {(m[1] - m[2]) / (m[1] + m[2])}
Z <- matrix(c(1, 1, 1, 1), nrow = 4)
check.zero.order.homog(S.fct, Z)

# EXAMPLE 2
S.fct.2 <- function(m) {m[1] - m[2]}
Z <- matrix(c(1, 1, 1, 1), nrow = 4)
check.zero.order.homog(S.fct.2, Z)

[Package cta version 1.3.0 Index]