fect
2.4.5Fixed Effects Counterfactual Estimators
Overview
Provides tools for estimating causal effects in panel data using counterfactual methods, as well as other modern DID estimators. It is designed for causal panel analysis with binary treatments under the parallel trends assumption. The package supports scenarios where treatments can switch on and off and allows for limited carryover effects. It includes several imputation estimators, such as Gsynth (Xu 2017), linear factor models, and the matrix completion method. Detailed methodology is described in Liu, Wang, and Xu (2024) doi:10.48550/arXiv.2107.00856 and Chiu et al. (2025) doi:10.48550/arXiv.2309.15983. Optionally integrates with the "HonestDiDFEct" package for sensitivity analyses compatible with imputation estimators. "HonestDiDFEct" is not on CRAN but can be obtained from https://github.com/lzy318/HonestDiDFEct.
Install
Health
- OK2026-06-0913 OK · 0 NOTE · 0 WARNING · 0 ERROR · 0 FAILURE
- ERROR2026-06-0812 OK · 0 NOTE · 0 WARNING · 1 ERROR · 0 FAILURE
- OK2026-04-2512 OK · 0 NOTE · 0 WARNING · 0 ERROR · 0 FAILURE
- NOTE2026-04-2211 OK · 3 NOTE · 0 WARNING · 0 ERROR · 0 FAILURE
- ERROR2026-04-1810 OK · 3 NOTE · 0 WARNING · 1 ERROR · 0 FAILURE
Show 1 earlier snapshots
- NOTE2026-03-1011 OK · 3 NOTE · 0 WARNING · 0 ERROR · 0 FAILURE
Documentation
- Examples that run
- 46%
- Documented parameters
- 99%
- Return-value docs
- 93%
- References docs
- 50%
Downloads
Repository
Stars over time
Forks over time
Releases over time
Issues over time
PRs over time
Repository practices
3 development-tooling and community-health practices detected across 3 families in the upstream repository
Checks run against github.com/xuyiqing/fect on 2026-07-19.
Dependencies
Code & Tests
- Cyclomatic complexity
- 3.0 median / 1,221 max
- Test cases
- 551 / 0.48 per code line
Test coverage
Line coverage
–
Expression
–
Tests / Examples
–
Functions
257 14 exported
Complexity
33.4 avg / 1221 max
Call network
257 nodes / 265 edges
Call graph
Open call graph →Lowest coverage
Per-function coverage is not measured for this package yet.
Datasets
| Name | Class | Rows × Cols | Also ships in |
|---|---|---|---|
| gs2020 | tbl_df/tbl/data.frame | 7,007 × 9 | – |
| hh2019 | data.frame | 22,971 × 4 | – |
| sim_base | data.frame | 7,000 × 18 | – |
| sim_gsynth | data.frame | 1,500 × 15 | in 2 packages |
| sim_linear | data.frame | 10,000 × 4 | – |
| sim_region | data.frame | 9,189 × 6 | – |
| sim_trend | data.frame | 10,000 × 4 | – |
| simdata | data.frame | 7,000 × 18 | – |
| simgsynth | data.frame | 1,500 × 15 | in 2 packages |
| turnout | data.frame | 1,128 × 6 | in 3 packages |
People & History
6 releases. Pick two to compare their code metrics. R releases are shown for context.
Package metadata
- First published
- 2022-10-14
- Total releases
- 6 / 4 yrs
- License
- MIT + file LICENSE OSI
- Minimum R
- ≥ 4.1.0
- Bundled data
- 1.1 MB / 10 files
- Download size
- 1.3 MB
- Installed size
- not tracked yet
- With dependencies
- not tracked yet