Learn R Programming

cta (version 1.3.0)

f.psi: Model Comparison Statistics

Description

Computes one of the model comparison statistics.

The model comparison statistics include:

  • "diff.Gsq": The difference in \(G^2\) statistic, $$G^{2}(\psi) - G^2 = G^{2}(y; H_{0}(\psi)) - G^{2}(y; H_{0});$$

  • "diff.Xsq": The difference in \(X^2\) statistic, $$X^{2}(\psi) - X^2 = X^{2}(y; H_{0}(\psi)) - X^{2}(y; H_{0});$$

  • "diff.PD": The difference in power-divergence statistic, with index parameter \(\lambda\), $$PD_{\lambda}(\psi) - PD_{\lambda} = PD_{\lambda}(y; H_{0}(\psi)) - PD_{\lambda}(y; H_{0});$$

  • "nested.Gsq": The nested \(G^2\) statistic, $$G^{2}(y; H_{0}(\psi) | H_{0});$$

  • "nested.Xsq": The nested \(X^2\) statistic, $$X^{2}(y; H_{0}(\psi) | H_{0});$$

  • "nested.PD": The nested power-divergence statistic, with index parameter \(\lambda\), $$PD_{\lambda}(y; H_{0}(\psi) | H_{0}).$$

Usage

f.psi(y, strata, fixed.strata, h0.fct, h0.fct.deriv = NULL,
      S0.fct, S0.fct.deriv = NULL, method_specific, psi,
      max.mph.iter, step, change.step.after, y.eps, iter.orig,
      norm.diff.conv, norm.score.conv, max.score.diff.iter,
      pdlambda = NULL, Gsq_H0, Xsq_H0, PD_H0, cons.MLE.m_H0)

Arguments

y

Observed table counts in the contingency table(s), in vector form.

strata

Vector of the same length as y that gives the stratum membership identifier.

fixed.strata

The object that gives information on which stratum (strata) has (have) fixed sample sizes.

h0.fct

The constraint function \(h_{0}(\cdot)\) with respect to \(m\), where \(m = E(Y)\), the vector of expected table counts.

h0.fct.deriv

The R function object that computes analytic derivative of the transpose of the constraint function \(h_{0}(\cdot)\) with respect to \(m\). If h0.fct.deriv is not specified or h0.fct.deriv = NULL, numerical derivatives will be used.

S0.fct

The estimand function \(S_{0}(\cdot)\) with respect to \(m\).

S0.fct.deriv

The R function object that computes analytic derivative of the estimand function \(S_{0}(\cdot)\) with respect to \(m\). If S0.fct.deriv is not specified or S0.fct.deriv = NULL, numerical derivatives will be used.

method_specific

A character string that indicates which model comparison statistic to compute. It can be one of "diff.Xsq", "nested.Xsq", "diff.Gsq", "nested.Gsq", "diff.PD", or "nested.PD".

psi

The real number \(\psi\) in the model comparison statistic.

max.mph.iter, step, change.step.after, y.eps, iter.orig, norm.diff.conv, norm.score.conv, max.score.diff.iter

The parameters used in mph.fit.

pdlambda

The index parameter \(\lambda\) in the power-divergence statistic.

Gsq_H0

The \(G^2\) statistic for testing \(H_{0}\) vs. not \(H_{0}\), i.e. \(G^{2}(y; H_{0})\).

Xsq_H0

The \(X^2\) statistic for testing \(H_{0}\) vs. not \(H_{0}\), i.e. \(X^{2}(y; H_{0})\).

PD_H0

The power-divergence statistic for testing \(H_{0}\) vs. not \(H_{0}\), i.e. \(PD_{\lambda}(y; H_{0})\).

cons.MLE.m_H0

Constrained MLE of \(m = E(Y)\) subject to \(H_{0}\).

Value

f.psi returns a numeric value, which is the computed model comparison statistic.

References

Zhu, Q. (2020) "On improved confidence intervals for parameters of discrete distributions." PhD dissertation, University of Iowa.

See Also

diff_Xsq_nr, nested_Xsq_nr, diff_Gsq_nr, nested_Gsq_nr, diff_PD_nr, nested_PD_nr, diff_Xsq_robust, nested_Xsq_robust, diff_Gsq_robust, nested_Gsq_robust, diff_PD_robust, nested_PD_robust, ci.table