Skip to content

gsynth

1.4.0Package record

Generalized Synthetic Control Method

0packages dependsuggested by 1
23.2Kdownloads / year
100.0%test coverage
13/13flavors OK

Overview

About

Conducts causal inference with interactive fixed-effect models. It imputes counterfactuals for each treated unit using control group information based on a linear interactive fixed effects model that incorporates unit-specific intercepts interacted with time-varying coefficients. This method generalizes the synthetic control method to the case of multiple treated units and variable treatment periods, and improves efficiency and interpretability. See Xu (2017) doi:10.1017/pan.2016.2 for details.

Changes in 1.4.0
  • **Breaking change**: The estimator parameter now maps directly to estimation methods. estimator = "gsynth" (new default) uses the generalized synthetic control method (Xu 2017); estimator = "ife" uses the IFE-EM algorithm (Gobillon & Magnac 2016); estimator = "mc" uses matrix completion (Athey et al. 2021). The legacy EM = TRUE parameter is equivalent to estimator = "ife" when estimator is not explicitly specified.
  • Fixed loadings plot warnings from GGally::ggpairs (upstream fix in **fect**).
  • Replaced pkgdown vignette with Quarto book tutorial.
  • Updated DESCRIPTION: added BugReports, Encoding, GitHub URL.

From NEWS.md in the release

Install

Health

CRAN checks
13OK
Slowest check: 2.7 min · r-oldrel-windows-x86_64
Status changes
  • OK13 OK2026-09-09
  • ERROR12 OK, 1 ERROR2026-09-04
  • OK13 OK2026-08-05
  • NOTE12 OK, 1 NOTE2026-08-01
  • OK13 OK2026-06-09
Show 2 earlier changesHide 2 earlier changes
  • ERROR12 OK, 1 ERROR2026-06-08
  • OK14 OK2026-03-10
Advisories

none known

Documentation

In release 1.4.0
README· In the repository, left out of the releaseVignettesNoNEWSYes · 100% structured · mentions 1.4.0Citation fileNoWebsiteYes
Help pages
8 (2 internal)includes a package overview page
Examples that run
100%1 run in a plain check
Exported functions with examples
50%
Documented parameters
100%
Return-value docs
100%
Help pages citing references
88%

Downloads

23.2K
CRAN downloads in the past year
Rank #2,790 · ~63/day · ~1.9K/mo
Daily download trend is not available in this view yet.
1.5K30 days
5.3K90 days
23.2K1 year
Compare downloads with other packages →
Also on621 r2u4 autocran432 conda_forge151 c2d4u

Repository

155Stars
46Forks
0Open issues
0Open PRs
2Releases
114Commits
8Commit identities
114 commits · Last activity 2026-03-27 · 0% stars, 30d
Responsiveness
How these are sampled
PRs merged (all time)
50%
Median days to close, 50 most recently updated closed issues
1,834
Median days to close, 50 most recently updated closed PRs
10

Stars over time

2025-07-22 · 1402026-09-30 · 155
PracticesBeta

2 development-tooling and community-health practices detected across 2 families in the upstream repository

Checks run against github.com/xuyiqing/gsynth on 2026-10-18.

Docs source (1)
README.Rmd
Lint, format, editor (1)
RStudio project
How this is detected·Detection ruleset v3 (2026-09-26)
AI coding toolsBeta

This repository shows signs of AI coding tools.

  • Claude Codefirst seen 2026-03-20
    Pull request it wrote: opened by a project member
    Commits: at least 3 crediting it in the message
Models named in its commits
  • Claude Opus 4.63 commits · Mar 2026
Counts are commits, not lines of code. Commits by a tool's accounts count once across all of its accounts. Commits crediting it are the largest count among its credit lines, a minimum.How this is detected·Detection ruleset v4 (updated 2026-09-27)

Dependencies

Declared dependencies
4 external dependencies (excludes base and recommended)

Installing gsynth adds 65 packages (26 with compiled code, 55 MB of source tarballs). Heaviest: stringi 11 MB, ggplot2 6.0 MB, fixest 4.8 MB.

Depends (1)
R >= 2.10
LinkingTo (0)
none
Suggests (1)
Enhances (0)
none
Reverse dependencies
0direct
0indirect
Suggested by 1
Suggests, most downloaded first

Datasets

People & History

People (4)
Author, Maintainer since 1.0.2 (2017)
Author · added in 1.3.1
Author · added in 1.0.5
Author · added in 1.3.1
Listed in earlier versions (2)
University of California
no longer listed · 1.0.2 to 1.0.3
San Diego
no longer listed · 1.0.2 to 1.0.3
Releases (8)

Pick two releases to compare their code metrics.

  • R
    R 4.6.0 released · 2026-04-24
  • 1.4.0Latest
    record
    2026-03-27 · current release · diff ↗
  • 1.3.1
    record
    2025-12-09 · diff ↗ ·
    removed 2 exports
    interFE, cumuEff
    added 1 export
    effect
  • 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
  • R
    R 4.2.0 released · 2022-04-22
  • 1.2.1
    record
    2021-08-06 · diff ↗ ·
    added 1 export
    cumuEff
  • R
    R 4.1.0 released · 2021-05-18
  • R
    R 4.0.0 released · 2020-04-24
  • R
    R 3.6.0 released · 2019-04-26
  • 1.0.9
    record
    2018-08-25 · diff ↗
  • R
    R 3.5.0 released · 2018-04-23
  • 1.0.6
    record
    2017-10-16 · diff ↗
  • 1.0.5
    record
    2017-10-12 · diff ↗
  • R
    R 3.4.0 released · 2017-04-21
Show 3 earlier eventsHide 3 earlier events
  • 1.0.3
    record
    2017-03-13 · diff ↗ ·
    removed 1 export
    pattern:^[[:alpha:]]+
  • 1.0.2
    record
    2017-03-12
  • R
    R 3.3.0 released · 2016-05-03

Package metadata

First published
2017-03-12
Total releases
8 / 9 yrs
License
MIT + file LICENSE OSI · relicensed from GPL-2 in 1.2.1
Minimum R
≥ 2.10
Bundled data
62 KB / 1 file
Download size
90 KB

Cite

Cite this package

Run in R for the authors' preferred citation:

citation("gsynth")
Xu, Y., Hu, S., Liu, L., & Liu, Z. (2026). gsynth: Generalized Synthetic Control Method (Version 1.4.0) [Computer software]. https://doi.org/10.32614/CRAN.package.gsynth

This package has no citation file, so citation() returns this entry built from DESCRIPTION.

Cite the R Observatory

For a number measured here: a download total, a coverage figure, an archival date.

APA

Balamuta, J. J. (2026). R Observatory: Metrics for gsynth version 1.4.0 [Data set]. HJJB, LLC. Data release v2026-10-22. https://doi.org/10.5281/zenodo.21843040

From data release v2026-10-22, which the citation names so these numbers can be found later. More on citing and the projects behind them.

Report a problem with this page →

Privacy choices

These apply to this browser and are stored on this device only. Nothing about your choice is sent to us.

Read the privacy policy