Learn R Programming

fect (version 2.1.0)

Fixed Effects Counterfactual Estimators

Description

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) and Chiu et al. (2025) . Optionally integrates with the "HonestDiDFEct" package for sensitivity analyses compatible with imputation estimators. "HonestDiDFEct" is not on CRAN but can be obtained from .

Copy Link

Version

Install

install.packages('fect')

Monthly Downloads

1,909

Version

2.1.0

License

MIT + file LICENSE

Issues

Pull Requests

Stars

Forks

Maintainer

Yiqing Xu

Last Published

January 17th, 2026

Functions in fect (2.1.0)

simgsynth

Simulated data for Gsynth
interFE

Interactive Fixed Effects Models
print.interFE

Print Results
simdata

Simulated data
plot.fect

Plot Method for 'fect' Objects
print.fect

Print Results
hh2019

Simulated Panel Data Example
turnout

EDR and Voter Turnout in the US
esplot

Event Study Visualization
get.cohort

Obatin the Cohort Index
did_wrapper

A Multi-Method Difference-in-Differences Estimator
effect

Calculate Cumulative or Sub-group Treatment Effects
fect

Fixed Effects Counterfactual Estimators
gs2020

Simulated Gsynth-like Panel Data (No Reversal)
fect-package

Fixed Effects Counterfactual Estimators
fect_sens

Sensitivity Analysis for fect Objects under Relative Magnitude and Smoothness Restrictions
att.cumu

Calculate Cumulative Treatment Effects
fect-internal

Internal FEct Functions