Description Usage Arguments Details Value Author(s) References See Also Examples
View source: R/check.zero.order.homog.R
Checks whether the estimand function S(\cdot) is zero-order Z homogeneous.
1 | check.zero.order.homog(S.fct, Z, tol = 1e-9)
|
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 |
The main idea:
S(\cdot) is zero-order Z homogeneous if S(Diag(Zγ) x) = S(x), for all γ > 0, and for all x within its domain. This program randomly generates gam
(γ) and x
(x), and computes
\texttt{diff.LRHS} = S(Diag(Zγ) x) - S(x).
It returns a warning if norm(diff.LRHS)
is too far from 0.
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.
Qiansheng Zhu
Lang, J. B. (2004) Multinomial-Poisson homogeneous models for contingency tables, Annals of Statistics, 32, 340–383.
1 2 3 4 5 6 7 8 9 | # 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)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.