Skip to content

fix: update tidy.fixest() docs to use vcov, add cluster/vcov tests#1276

Open
LeonidasZhak wants to merge 1 commit into
tidymodels:mainfrom
LeonidasZhak:fix/fixest-vcov-docs
Open

fix: update tidy.fixest() docs to use vcov, add cluster/vcov tests#1276
LeonidasZhak wants to merge 1 commit into
tidymodels:mainfrom
LeonidasZhak:fix/fixest-vcov-docs

Conversation

@LeonidasZhak

Copy link
Copy Markdown

Summary

Updates tidy.fixest() documentation to reference the modern vcov argument instead of the deprecated se argument, and adds comprehensive tests for clustered SE functionality.

Problem

The current tidy.fixest() documentation:

  • References the deprecated se argument as the primary way to specify robust/clustered SEs
  • Lacks examples for formula-based clustering (vcov = ~cluster)
  • Has no tests for the cluster argument or the newer vcov argument

Fix

Documentation (R/fixest.R):

  • Updated @param ... to document vcov as the primary argument (string like "hetero" or formula like ~Product + Year)
  • Noted that se is accepted but deprecated
  • Replaced se = "threeway" example with vcov = ~Product + Year and vcov = "hetero"

Tests (tests/testthat/test-fixest.R):

  • Added test block for cluster argument: multi-way clustering, single cluster, conf.int integration, threeway SE
  • Added test block for vcov argument: string equivalence with se, formula equivalence with cluster, conf.int integration

Validation

  • New test blocks pass: 5/5 successes for cluster tests, 5/5 for vcov tests
  • roxygen2::roxygenise() regenerated Rd files successfully
  • No existing tests broken

Files changed

  • R/fixest.R — Updated docs and examples
  • tests/testthat/test-fixest.R — Added 2 new test blocks (37 lines of tests)
  • man/tidy.fixest.Rd, man/augment.fixest.Rd, man/glance.fixest.Rd — Regenerated

- Update @param ... to reference vcov (modern) instead of deprecated se
- Document vcov formula syntax for clustering (~Product + Year)
- Add vcov='hetero' example alongside clustered SE example
- Add tests for cluster argument (multi-way, single, with conf.int)
- Add tests for vcov argument (string, formula, equivalence with se)
- Regenerate fixest Rd files from roxygen source
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant