Compute Cluster Robust Standard Errors with Degrees of Freedom Adjustments
Overview
Estimate different types of cluster robust standard errors (CR0, CR1, CR2) with degrees of freedom adjustments. Standard errors are computed based on 'Liang and Zeger' (1986) doi:10.1093/biomet/73.1.13 and Bell and 'McCaffrey' https://www150.statcan.gc.ca/n1/en/pub/12-001-x/2002002/article/9058-eng.pdf?st=NxMjN1YZ. Functions used in Huang and Li doi:10.3758/s13428-021-01627-0, Huang, 'Wiedermann', and 'Zhang' doi:10.1080/00273171.2022.2077290, and Huang, 'Zhang', and Li (forthcoming: Journal of Research on Educational Effectiveness).
- Added a
NEWS.mdfile to track changes to the package. - Added col/row names to the robust variance/covariance matrix
- Adjusted the "meat" matrix so computations would still run even if only the intercept is used as a predictor (a null model)
- Added tidy methods so CR2 objects can be used with other packages such as modelsummary or gtsummary
- As of 2023.01.03
From NEWS.md in the release
Install
Health
NOTERd filesr-devel-linux-x86_64-debian-clang, r-devel-linux-x86_64-debian-gcc, r-devel-linux-x86_64-fedora-clang, r-devel-linux-x86_64-fedora-gcc, r-devel-windows-x86_64, r-oldrel-macos-arm64, r-oldrel-macos-x86_64, r-oldrel-windows-x86_64, r-patched-linux-x86_64, r-release-linux-x86_64, r-release-macos-arm64, r-release-macos-x86_64, r-release-windows-x86_64
checkRd: (-1) sharedat.Rd:23: Lost braces
23 | \doi{10.7910/DVN/YXMQZM}{Harvard dataverse}
| ^NOTECRAN incoming feasibilityr-devel-linux-x86_64-debian-clang, r-devel-linux-x86_64-debian-gcc
Maintainer: ‘Francis Huang <flhuang2000@yahoo.com>’ Package CITATION file contains call(s) to old-style personList() or as.personList(). Please use c() on person objects instead. Package CITATION file contains call(s) to old-style citEntry(). Please use bibentry() instead.
- NOTE13 NOTENow
- NOTE14 NOTE2026-03-10
Documentation
- Help pages
- 13 (1 internal)
- Examples that run
- 100%4 run in a plain check
- Exported functions with examples
- 43%
- Documented parameters
- 100%
- Return-value docs
- 100%
- Help pages citing references
- 31%
Downloads
Repository
Stars over time
Issues over time
3 development-tooling and community-health practices detected across 2 families in the upstream repository
Checks run against github.com/flh3/cr2 on 2026-10-21.
Dependencies
Installing CR2 adds 34 packages (19 with compiled code, 34 MB of source tarballs). Heaviest: stringi 11 MB, lme4 4.3 MB, nloptr 2.1 MB.
CRAN will archive these unless their check problems are fixed by the date shown. This package needs each one to install.
- insight through performancefix by Nov 14
Code & Tests
Datasets
People & History
Pick two releases to compare their code metrics.
- RR 4.6.0 released · 2026-04-24
- RR 4.5.0 released · 2025-04-11
- RR 4.4.0 released · 2024-04-24
- RR 4.3.0 released · 2023-04-21
- 0.2.1Latest
- 0.1.12022-06-17 · diff ↗
- 0.1.02022-05-21
- RR 4.2.0 released · 2022-04-22
Package metadata
- First published
- 2022-05-21
- Total releases
- 3 / 4 yrs
- License
- MIT + file LICENSE OSI
- Minimum R
- ≥ 2.10
- Bundled data
- 53 KB / 4 files
- Download size
- 78 KB
Cite
Cite this package
Run in R for the authors' entry:
citation("CR2")The package provides a citation file, so citation() returns the authors' own entry.
Cite the R Observatory
For a number measured here: a download total, a coverage figure, an archival date.
From data release v2026-10-25, which the citation names so these numbers can be found later. More on citing and the projects behind them.