Builds a summary for an hcinfer() result. The summary object stores model
metadata, HC method information, leverage and robust weight diagnostics,
coefficient-by-coefficient normal Wald tests with p-values and confidence
intervals, and a joint quasi-F test that the coefficients other than the
intercept are zero.
The print method offers two layouts. The clean layout, used by default,
follows the style of stats::summary.lm(): it shows the model, the robust
covariance estimator, the leverage diagnostics, the method parameters, a
coefficient table with columns term, estimate, robust_se, z, and
p_value, and the quasi-F test. When a null value given to hcinfer() is
nonzero, the table also shows the column null_value, because z and
p_value refer to these null values. The detailed layout, requested with
simple = FALSE, adds robust weight diagnostics, test decisions at level
alpha, and confidence intervals. The layout affects printing only; the
other components of the object do not depend on simple.
Usage
# S3 method for class 'hcinfer'
summary(object, simple = TRUE, ...)Arguments
- object
An object returned by
hcinfer().- simple
Logical.
TRUE(default) prints the clean report;FALSEprints the detailed report.- ...
Unused.
Value
An object of class summary_hcinfer. Besides the model metadata, the method
parameters, the leverage and weight diagnostics, and the coefficient table
tests, it contains:
simpleThe value of
simple, which selects the printed layout.num_obsNumber of observations.
quasi_fA one-row tibble with the quasi-F statistic (
statistic), the degrees of freedom \(q\) (df), and the asymptotic p-value (p_value), orNULLfor an intercept-only model.
Details
Let \(\hat\beta_2\) collect the \(q\) coefficients other than the
intercept and let \(\widehat{\Psi}_{22}\) be the corresponding block of
the HC covariance matrix stored in object. The quasi-F test is based on
the Wald statistic
$$W = \hat\beta_2^\top \widehat{\Psi}_{22}^{-1} \hat\beta_2,$$
which is asymptotically \(\chi^2_q\) under \(H_0: \beta_2 = 0\) when the HC estimator is consistent (Godfrey, 2006). The summary reports \(F = W / q\) together with the p-value \(P(\chi^2_q \ge W)\), that is, \(F\) is referred to the asymptotic \(\chi^2_q / q\) distribution, in line with the normal reference of the coefficient tests. In simulations with 27, 54, and 108 observations, Godfrey (2006) found that asymptotic critical values did not reliably control the null rejection probabilities of such joint tests, so the p-value is an approximation that deserves caution in small and moderate samples.
When the model has no intercept, all coefficients are tested; for
intercept-only models the test is omitted. The null values are zero
regardless of the null argument of hcinfer(). When the tested covariance
block is not numerically positive definite, the statistic and the p-value
are NA.
References
Godfrey, L. G. (2006). Tests for regression models with heteroskedasticity of unknown form. Computational Statistics and Data Analysis, 50(10), 2715-2733. doi:10.1016/j.csda.2005.04.004
