Package: hcinfer 0.3.0

hcinfer: Heteroskedasticity-Consistent Inference for Linear Models

Performs heteroskedasticity-consistent inferences in linear regressions under heteroskedasticity. The published HC0 through HC5m estimators implemented in the package follow White (1980) <doi:10.2307/1912934>, Hinkley (1977) <doi:10.1080/00401706.1977.10489550>, MacKinnon and White (1985) <doi:10.1016/0304-4076(85)90158-7>, Cribari-Neto (2004) <doi:10.1016/S0167-9473(02)00366-3>, Cribari-Neto and da Silva (2011) <doi:10.1007/s10182-010-0141-2>, Cribari-Neto et al. (2007) <doi:10.1080/03610920601126589> with its erratum <doi:10.1080/03610920802109210>, and Li et al. (2016) <doi:10.1080/00949655.2016.1198906>. The package also includes HCbeta, a new estimator proposed by the package authors. It additionally provides feasible generalized least squares estimation under multiplicative heteroskedasticity following Harvey (1976) <doi:10.2307/1913974> and Cribari-Neto and Pereira (2019) <doi:10.1080/00949655.2019.1586902>, with two-step and maximum likelihood fitting and information criteria for the likelihood fit. It provides normal Wald tests, confidence intervals, diagnostics, and S3 output for applied inference.

Authors:Pedro Rafael D. Marinho [aut, cre], Francisco Cribari-Neto [aut], Marina Oliveira Cunha [aut]

hcinfer_0.3.0.tar.gz
hcinfer_0.3.0.zip(r-4.7-any)hcinfer_0.3.0.zip(r-4.6-any)hcinfer_0.3.0.zip(r-4.5-any)
hcinfer_0.3.0.tgz(r-4.6-any)hcinfer_0.3.0.tgz(r-4.5-any)
hcinfer_0.3.0.tar.gz(r-4.7-any)hcinfer_0.3.0.tar.gz(r-4.6-any)
hcinfer_0.3.0.tgz(r-4.6-emscripten)
manual.pdf |manual.html✨
DESCRIPTION |NEWS
card.svg |card.png
hcinfer/json (API)

# Install 'hcinfer' in R:
install.packages('hcinfer', repos = c('https://prdm0.r-universe.dev', 'https://cloud.r-project.org'))

Bug tracker:https://github.com/prdm0/hcinfer/issues

Pkgdown/docs site:https://prdm0.github.io

Datasets:
  • Crime2009 - State crime rates and socioeconomic indicators, 2009
  • Hprice - Boston-area home prices, 1990
  • PublicSchools - Public school expenditure and income by U.S. jurisdiction
  • PublicSchools2 - Public school expenditure, income, and region by U.S. jurisdiction

On CRAN:

Conda:

5.70 score 1 stars 16 scripts 328 downloads 6 exports 23 dependencies

Last updated from:af4ab58c3f. Checks:9 OK. Indexed: yes.

TargetResultTimeFilesSyslog
linux-develOK141
source / vignettesOK201
linux-releaseOK145
macos-releaseOK106
macos-oldrelOK86
windows-develOK90
windows-releaseOK91
windows-oldrelOK89
wasm-releaseOK127

Exports:boot_pairsgls_multhc_methodshcinfertestsvcov_hc

Dependencies:clicpp11farverggplot2gluegtableisobandlabelinglifecyclemagrittrpillarpkgconfigpurrrR6RColorBrewerrlangS7scalestibbleutf8vctrsviridisLitewithr

Comparing HC Estimators
Fit one model | Run several methods | Compare one coefficient | Plot the robust standard errors | Compare confidence intervals directly | Compare covariance objects | Compare diagnostics across methods | What to report

Last update: 2026-08-25
Started: 2026-05-27

Feasible GLS under multiplicative heteroskedasticity
HC inference versus feasible GLS | The multiplicative variance model | Two estimators | Harvey two-step | Maximum likelihood | Data and model | Maximum likelihood fit | Extracting the fit | Custom variance models | Model selection with AIC and BIC | Comparison with HC standard errors | Practical guidance

Last update: 2026-08-25
Started: 2026-08-25

HC Estimator Methodology
The model and the target covariance matrix | The sandwich form | The hat matrix and leverage | Residual compression | The classical HC family | HC5 and HC5m | Overshooting | HCbeta motivation | HCbeta construction | Normal Wald inference | Practical guidance | Implementation notes | References

Last update: 2026-08-25
Started: 2026-06-02

Introduction to hcinfer
Data and model | Available estimators | Robust inference | Test extraction | Confidence interval extraction | Coefficients and covariance matrices | Covariance-only workflow | Plots | Typical workflow

Last update: 2026-08-25
Started: 2026-05-27

Pairs bootstrap inference with hcinfer
The method | Data and model | Running the bootstrap | Extractors | Visualizing the intervals | An empirical reference for HC standard errors | Reproducibility | Running in parallel | Practical guidance

Last update: 2026-08-25
Started: 2026-07-26

The HCbeta algorithm and its consistency
Motivation | The algorithm | Consistency | Numerical implementation

Last update: 2026-08-25
Started: 2026-07-29

Using HCbeta
Run HCbeta | Inspect HCbeta parameters | Inspect leverage and weights | Run a sensitivity check

Last update: 2026-08-25
Started: 2026-05-27

Readme and manuals

Help Manual

Help pageTopics
Pairs bootstrap standard errors and confidence intervalsboot_pairs print.hcinfer_boot
Extract model coefficients from an hcinfer objectcoef.hcinfer
Confidence intervals for hcinfer objectsconfint.hcinfer
State crime rates and socioeconomic indicators, 2009Crime2009
Feasible GLS under multiplicative heteroskedasticitygls_mult
Methods for multiplicative heteroskedasticity GLS fitscoef.gls_mult confint.gls_mult fitted.gls_mult gls_mult-methods logLik.gls_mult nobs.gls_mult print.gls_mult print.summary_gls_mult residuals.gls_mult summary.gls_mult tests.gls_mult vcov.gls_mult
Available heteroskedasticity-consistent estimatorshc_methods
Heteroskedasticity-consistent Wald inferencehcinfer
Extract components from a pairs bootstrap objectcoef.hcinfer_boot confint.hcinfer_boot hcinfer_boot-methods vcov.hcinfer_boot
Boston-area home prices, 1990Hprice
Plot multiplicative heteroskedasticity FGLS confidence intervalsplot.gls_mult
Plot robust confidence intervalsplot.hcinfer
Plot pairs bootstrap confidence intervalsplot.hcinfer_boot
Plot HC adjustment factors against leveragesplot.hcinfer_vcov
Print hcinfer objectsprint.hcinfer
Print hcinfer covariance objectsprint.hcinfer_vcov
Public school expenditure and income by U.S. jurisdictionPublicSchools
Public school expenditure, income, and region by U.S. jurisdictionPublicSchools2
Summarize heteroskedasticity-consistent inferencesummary.hcinfer
Summarize heteroskedasticity-consistent covariance objectssummary.hcinfer_vcov
Extract coefficient test resultstests tests.hcinfer
Heteroskedasticity-consistent covariance estimatorvcov_hc
Extract robust covariance matricesvcov.hcinfer vcov.hcinfer_vcov