Skip to content

fect

2.4.5

Fixed Effects Counterfactual Estimators

2packages depend
21.5Kdownloads / year
test coverage
13/13checks pass

Overview

About
Maintained by Yiqing XuFirst published 2022-10-146 releasesCRAN page ↗GitHub ↗

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

CRAN checks
13OK
Slowest check: 10.5 min · r-devel-linux-x86_64-fedora-clang
Code health
Yes
Tests · ratio 0.48
not tracked
Coverage
100%
Documentation · exports
22
Dependencies · direct
Check history
  • OK2026-06-09
    13 OK · 0 NOTE · 0 WARNING · 0 ERROR · 0 FAILURE
  • ERROR2026-06-08
    12 OK · 0 NOTE · 0 WARNING · 1 ERROR · 0 FAILURE
  • OK2026-04-25
    12 OK · 0 NOTE · 0 WARNING · 0 ERROR · 0 FAILURE
  • NOTE2026-04-22
    11 OK · 3 NOTE · 0 WARNING · 0 ERROR · 0 FAILURE
  • ERROR2026-04-18
    10 OK · 3 NOTE · 0 WARNING · 1 ERROR · 0 FAILURE
Show 1 earlier snapshots
  • NOTE2026-03-10
    11 OK · 3 NOTE · 0 WARNING · 0 ERROR · 0 FAILURE

Documentation

Documentation
READMENoVignettesNopkgdown siteNoNEWSNoCode of conductNoContributing guideNo
Examples that run
46%
Documented parameters
99%
Return-value docs
93%
References docs
50%

Downloads

21.5K
CRAN downloads in the past year
Rank #2,590 · ~59/day · ~1.8K/mo
Daily download trend is not available in this view yet.
2.5K30 days
8.3K90 days
21.5K1 year
Compare downloads with other packages →
Also on706 r2u27 autocran

Repository

Repository
83Stars
29Forks
1Open issues
1Open PRs
5Releases
510Commits
12Contributors
510 commits · Last activity 2026-07-15 · +1.2% stars, 30d

Stars over time

2025-06-16 · 692026-07-07 · 83

Repository practices

Upstream repositoryBeta

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.

Continuous integration (1)
GitHub Actions
Docs source (1)
README.Rmd
Lint, format, editor (1)
RStudio project
How this is detected·Detection ruleset v1 (2026-07-18)

Dependencies

Declared dependencies
27 external dependencies (excludes base and recommended)
Depends (1)
R >= 4.1.0
LinkingTo (2)
Enhances (0)
none
Reverse dependencies
2direct
0indirect

Code & Tests

Code Composition
R 48,156 (87%)C++ 4,885 (9%)Rd 2,118 (4%)C 60 (0%)
Code characteristics
Object systems
S38
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

Loading call graph…

Lowest coverage

Per-function coverage is not measured for this package yet.

Datasets

Bundled datasets · 10
NameClassRows × ColsAlso ships in
gs2020tbl_df/tbl/data.frame7,007 × 9
hh2019data.frame22,971 × 4
sim_basedata.frame7,000 × 18
sim_gsynthdata.frame1,500 × 15in 2 packages
sim_lineardata.frame10,000 × 4
sim_regiondata.frame9,189 × 6
sim_trenddata.frame10,000 × 4
simdatadata.frame7,000 × 18
simgsynthdata.frame1,500 × 15in 2 packages
turnoutdata.frame1,128 × 6in 3 packages

People & History

People (7)
Maintainer (1)
Author, Maintainer
Authors (7)
Author, Maintainer
Author · added in 2.0.5
Author · added in 2.0.5
Author
Author · added in 2.0.5
Author
Package Timeline

6 releases. Pick two to compare their code metrics. R releases are shown for context.

  • 2.4.5Latest
    2026-05-30 · current release · diff ↗
  • 2.4.1
    2026-04-30 · diff ↗
  • R
    R 4.6.0 released · 2026-04-24
  • 2.2.0
    2026-03-27 · diff ↗
  • 2.1.0
    2026-01-17 · diff ↗
  • 2.0.5
    2025-08-25 · diff ↗
  • R
    R 4.5.0 released · 2025-04-11
  • R
    R 4.4.0 released · 2024-04-24
  • R
    R 4.3.0 released · 2023-04-21
  • 1.0.0
    2022-10-14
  • R
    R 4.2.0 released · 2022-04-22

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
Report a problem with this page →