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

Zero-Order ZZ Homogeneity Check

Description

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

Usage

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

Arguments

S.fct

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

Z

Population (aka strata) matrix ZZ.

tol

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

Details

The main idea:

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

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

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

Value

check.zero.order.homog returns a character string check.result that states whether S()S(\cdot) is zero-order ZZ homogeneous. If check.result = "", it means that we cannot state that S()S(\cdot) is not zero-order ZZ 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]