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}).$$
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)Observed table counts in the contingency table(s), in vector form.
Vector of the same length as y that gives the stratum
membership identifier.
The object that gives information on which stratum (strata) has (have) fixed sample sizes.
The constraint function \(h_{0}(\cdot)\) with respect to \(m\), where \(m = E(Y)\), the vector of expected table counts.
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.
The estimand function \(S_{0}(\cdot)\) with respect to \(m\).
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.
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".
The real number \(\psi\) in the model comparison statistic.
The parameters used in mph.fit.
The index parameter \(\lambda\) in the power-divergence statistic.
The \(G^2\) statistic for testing \(H_{0}\) vs. not \(H_{0}\), i.e. \(G^{2}(y; H_{0})\).
The \(X^2\) statistic for testing \(H_{0}\) vs. not \(H_{0}\), i.e. \(X^{2}(y; H_{0})\).
The power-divergence statistic for testing \(H_{0}\) vs. not \(H_{0}\), i.e. \(PD_{\lambda}(y; H_{0})\).
Constrained MLE of \(m = E(Y)\) subject to \(H_{0}\).
f.psi returns a numeric value, which is the computed model comparison statistic.
Zhu, Q. (2020) "On improved confidence intervals for parameters of discrete distributions." PhD dissertation, University of Iowa.
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