Learn R Programming

fect (version 2.0.5)

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

492

Version

2.0.5

License

MIT + file LICENSE

Maintainer

Yiqing Xu

Last Published

August 25th, 2025

Functions in fect (2.0.5)

hh2019

Simulated Panel Data Example
print.fect

Print Results
print.interFE

Print Results
interFE

Interactive Fixed Effects Models
plot.fect

Plot Method for 'fect' Objects
turnout

EDR and Voter Turnout in the US
simdata

Simulated data
simgsynth

Simulated data for Gsynth
att.cumu

Calculate Cumulative Treatment Effects
get.cohort

Obatin the Cohort Index
gs2020

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

Fixed Effects Counterfactual Estimators
effect

Calculate Cumulative or Sub-group Treatment Effects
esplot

Event Study Visualization
fect_sens

Sensitivity Analysis for fect Objects under Relative Magnitude and Smoothness Restrictions
did_wrapper

A Multi-Method Difference-in-Differences Estimator
fect

Fixed Effects Counterfactual Estimators
fect-internal

Internal FEct Functions