Type: Package
Title: Information Matrix Test for Regression Models
Version: 0.1.0
Maintainer: Hasraddin Guliyev <hasradding@unec.edu.az>
Description: Implements the Information Matrix test for regression models following Cameron, A. C., & Trivedi, P. K. (1990) https://cameron.econ.ucdavis.edu/research/imtest_impliedalternatives_ucdwp372.pdf Decomposes the test into components for heteroscedasticity, skewness, and kurtosis to diagnose specific forms of misspecification. Provides both overall and component-wise statistics for model assessment.
License: GPL (≥ 3)
Depends: R (≥ 3.6.0)
Imports: stats
Suggests: spelling
Encoding: UTF-8
RoxygenNote: 7.3.3
URL: https://github.com/guliyevh/infotest
BugReports: https://github.com/guliyevh/infotest/issues
Language: en-US
NeedsCompilation: no
Packaged: 2025-10-26 22:52:58 UTC; macbookm4
Author: Hasraddin Guliyev [aut, cre]
Repository: CRAN
Date/Publication: 2025-10-30 14:30:02 UTC

Information Matrix Test for Regression Models

Description

infotest() applies the Information Matrix (IM) test to a fitted lm model and reports the Cameron & Trivedi (1990) decomposition into heteroskedasticity, skewness, and kurtosis components. Optionally, White's (1980) heteroskedasticity test is also reported.

Usage

infotest(model, white = TRUE, verbose = TRUE)

Arguments

model

A fitted lm object.

white

Logical; if TRUE, also compute and report White's test (default TRUE).

verbose

Logical; if TRUE, print detailed results to console (default TRUE).

Details

Information Matrix (IM) Test for lm() Models

The function checks that model is an lm fit and refuses weighted models. The intercept is removed from the design matrix, regressors are centered, and quadratic terms are constructed for the auxiliary regressions used by the IM and White tests. Test statistics are computed as chi-square values with associated degrees of freedom.

Value

An object of class infotest containing:

Warnings

Author(s)

Hasraddin Guliyev hasradding@unec.edu.az

References

White, H. (1980). A heteroskedasticity-consistent covariance matrix estimator and a direct test for heteroskedasticity. Econometrica, 48(4), 817–838.
Cameron, A. C., & Trivedi, P. K. (1990). The information matrix test and its applied alternatives. Econometric Theory, 6(2), 179–195.

See Also

lm, pchisq

Examples

m <- lm(Sepal.Length ~ Sepal.Width + Petal.Length, data = iris)

# Print results to console
infotest(m)

# Store results without printing
res <- infotest(m, verbose = FALSE)
print(res)

# Access components
str(res$decomposition)