Learn R Programming

cta (version 1.3.0)

Contingency Table Analysis Based on ML Fitting of MPH Models

Description

Contingency table analysis is performed based on maximum likelihood (ML) fitting of multinomial-Poisson homogeneous (MPH) and homogeneous linear predictor (HLP) models. See Lang (2004) and Lang (2005) for MPH and HLP models. Objects computed include model goodness-of-fit statistics; likelihood- based (cell- and link-specific) residuals; and cell probability and expected count estimates along with standard errors. This package can also compute test-inversion--e.g. Wald, profile likelihood, score, power-divergence--confidence intervals for contingency table estimands, when table probabilities are potentially subject to equality constraints. For test-inversion intervals, see Lang (2008) and Zhu (2020) .

Copy Link

Version

Install

install.packages('cta')

Monthly Downloads

85

Version

1.3.0

License

GPL (>= 2)

Maintainer

Qiansheng Zhu

Last Published

August 23rd, 2021

Functions in cta (1.3.0)

check.homog

\(Z\) Homogeneity Check
Wald_trans.Wald_nr

Wald-Type CIs (Non-Robust)
check.HLP

HLP Link Status Check
check.zero.order.homog

Zero-Order \(Z\) Homogeneity Check
M.fct

Marginalizing Matrix Based on Strata Information
Wald_trans.Wald_robust

Wald-Type CIs (Robust)
create.U

Orthogonal Complement of the Column Space of a Matrix
block.fct

Matrix Direct Sum
compute_cons_MLE_ase

Constrained MLE and ASE
ci.table

Test-Inversion CIs for Estimands in Contingency Tables
diff_Gsq_nr

Difference in \(G\)-Squared Statistic Based CIs (Non-Robust)
cta-package

cta: Contingency Table Analysis Based on ML Fitting of MPH Models
create.Z.ZF

Population Matrix and Sampling Constraint Matrix
diff_PD_robust

Difference in Power-Divergence Statistic Based CIs (Robust)
diff_PD_nr

Difference in Power-Divergence Statistic Based CIs (Non-Robust)
diff_Gsq_robust

Difference in \(G\)-Squared Statistic Based CIs (Robust)
nested_Xsq_robust

Nested \(X\)-Squared Statistic Based CIs (Robust)
num.deriv.fct

Numerical Derivatives Based on Central Difference Formula
f.psi

Model Comparison Statistics
solve_quadratic

Solve for Real Root(s) to the Quadratic Equation
quadratic.fit

Quadratic Fit
mph.fit

Fitting MPH and HLP Models
mph.summary

Summary Statistics of the Fitted MPH Model
nested_Gsq_nr

Nested \(G\)-Squared Statistic Based CIs (Non-Robust)
nested_Gsq_robust

Nested \(G\)-Squared Statistic Based CIs (Robust)
nested_PD_nr

Nested Power-Divergence Statistic Based CIs (Non-Robust)
diff_Xsq_robust

Difference in \(X\)-Squared Statistic Based CIs (Robust)
nested_PD_robust

Nested Power-Divergence Statistic Based CIs (Robust)
diff_Xsq_nr

Difference in \(X\)-Squared Statistic Based CIs (Non-Robust)
nested_Xsq_nr

Nested \(X\)-Squared Statistic Based CIs (Non-Robust)