{
  "_id": "6b078de6b6d08ed7e3d8b5a4",
  "Package": "synthdid",
  "Title": "Synthetic Difference-in-Difference Estimation",
  "Version": "0.0.9",
  "Author": "Dmitry Arkhangelsky [aut] Susan Athey [aut] David A. Hirshberg\n[aut, cre] Guido W. Imbens [aut] Stefan Wager [aut]",
  "Maintainer": "David A. Hirshberg <david.a.hirshberg@gmail.com>",
  "Description": "Estimate average treatment effects in panel data.\nCurrently provides methods only for the case that all treated\nunits adopt treatment at the same time.",
  "License": "GPL (>= 2) | BSD_3_clause + file LICENSE",
  "Encoding": "UTF-8",
  "LazyData": "true",
  "Roxygen": "list(markdown = TRUE)",
  "RoxygenNote": "7.1.1",
  "URL": "https://github.com/synth-inference/synthdid",
  "BugReports": "https://github.com/synth-inference/synthdid/issues",
  "Repository": "https://mikenguyen13.r-universe.dev",
  "Date/Publication": "2024-01-15 20:39:02 UTC",
  "RemoteUrl": "https://github.com/synth-inference/synthdid",
  "RemoteRef": "HEAD",
  "RemoteSha": "70c1ce3eac58e28c30b67435ca377bb48baa9b8a",
  "NeedsCompilation": "no",
  "Packaged": {
    "Date": "2026-11-26 01:26:17 UTC",
    "User": "root"
  },
  "_user": "mikenguyen13",
  "_type": "src",
  "_file": "synthdid_0.0.9.tar.gz",
  "_fileid": "https://r2.ropensci.org/66faf0d4b26175bd46915e2c5291328c1332c08336dea2f15fba36862d5be1f3",
  "_filesize": 277434,
  "_sha256": "66faf0d4b26175bd46915e2c5291328c1332c08336dea2f15fba36862d5be1f3",
  "_expires": "2027-03-06T01:39:48.000Z",
  "_created": "2026-11-26T01:26:17.000Z",
  "_published": "2026-11-26T01:39:50.239Z",
  "_upstream": "https://github.com/synth-inference/synthdid",
  "_status": "success",
  "_maintainer": {
    "name": "David A. Hirshberg",
    "email": "david.a.hirshberg@gmail.com",
    "login": "davidahirshberg",
    "description": "",
    "uuid": 1794012
  },
  "_jobs": [
    {
      "job": 139628587446,
      "time": 571,
      "config": "linux-devel-x86_64",
      "r": "4.7.0",
      "check": "ERROR",
      "artifact": "15078958524"
    },
    {
      "job": 139628587574,
      "time": 506,
      "config": "linux-release-x86_64",
      "r": "4.6.2",
      "check": "ERROR",
      "artifact": "15079561040"
    },
    {
      "job": 139628587544,
      "time": 631,
      "config": "macos-oldrel-arm64",
      "r": "4.5.3",
      "check": "ERROR",
      "artifact": "15079118144"
    },
    {
      "job": 139628587497,
      "time": 664,
      "config": "macos-release-arm64",
      "r": "4.6.2",
      "check": "ERROR",
      "artifact": "15079511030"
    },
    {
      "job": 139627520098,
      "time": 169,
      "config": "source",
      "r": "4.6.2",
      "check": "OK",
      "artifact": "15078033708"
    },
    {
      "job": 139628587560,
      "time": 88,
      "config": "wasm-release",
      "r": "4.6.0",
      "check": "OK",
      "artifact": "15079011952"
    },
    {
      "job": 139628587531,
      "time": 781,
      "config": "windows-devel-x86_64",
      "r": "4.7.0",
      "check": "ERROR",
      "artifact": "15079975452"
    },
    {
      "job": 139628587571,
      "time": 683,
      "config": "windows-oldrel-x86_64",
      "r": "4.5.3",
      "check": "ERROR",
      "artifact": "15079327677"
    },
    {
      "job": 139628587466,
      "time": 605,
      "config": "windows-release-x86_64",
      "r": "4.6.2",
      "check": "ERROR",
      "artifact": "15079680554"
    }
  ],
  "_buildurl": "https://github.com/r-universe/mikenguyen13/actions/runs/45735440357",
  "_commit": {
    "id": "70c1ce3eac58e28c30b67435ca377bb48baa9b8a",
    "author": "Petra Tschuchnig <155922122+PetraTschuchnig@users.noreply.github.com>",
    "committer": "GitHub <noreply@github.com>",
    "message": "enhancing stopping criterion in sc.weight.fw.covariates (#117)\n\nCo-authored-by: User <petra.tschuchnig@plus.ac.at>",
    "time": 1705351142
  },
  "_distro": "resolute",
  "_host": "GitHub-Actions",
  "_registered": true,
  "_dependencies": [
    {
      "package": "R",
      "version": ">= 3.4",
      "role": "Depends"
    },
    {
      "package": "mvtnorm",
      "role": "Imports"
    },
    {
      "package": "testthat",
      "role": "Suggests"
    },
    {
      "package": "ggplot2",
      "role": "Suggests"
    },
    {
      "package": "CVXR",
      "role": "Suggests"
    }
  ],
  "_owner": "synth-inference",
  "_selfowned": false,
  "_usedby": 1,
  "_updates": [],
  "_tags": [],
  "_stars": 317,
  "_contributors": [
    {
      "user": "davidahirshberg",
      "count": 82,
      "uuid": 1794012
    },
    {
      "user": "erikcs",
      "count": 35,
      "uuid": 7185264
    },
    {
      "user": "swager",
      "count": 6,
      "uuid": 1275702
    },
    {
      "user": "petratschuchnig",
      "count": 1,
      "uuid": 155922122
    },
    {
      "user": "awhitefield8",
      "count": 1,
      "uuid": 59574428
    }
  ],
  "_userbio": {
    "uuid": 57576563,
    "type": "user",
    "name": "Mike",
    "followers": 53
  },
  "_downloads": {
    "count": 0,
    "source": "https://cranlogs.r-pkg.org/downloads/total/last-month/synthdid"
  },
  "_devurl": "https://github.com/synth-inference/synthdid",
  "_searchresults": 458,
  "_abi": {
    "exports": [
      {
        "key": "synthdid::generic:Y",
        "hash": "f61c8393e6b16e3e"
      },
      {
        "key": "synthdid::generic:lambda",
        "hash": "cf64606a5a1b1cef"
      },
      {
        "key": "synthdid::generic:omega",
        "hash": "91ac7a25601cb1ee"
      },
      {
        "key": "synthdid::synthdid_estimate",
        "hash": "a0bea655b52274d1"
      }
    ],
    "imports": []
  },
  "_rbuild": "4.6.2",
  "_assets": [
    "extra/citation.cff",
    "extra/citation.html",
    "extra/citation.json",
    "extra/citation.txt",
    "extra/contents.json",
    "extra/manual.pdf",
    "extra/readme.html",
    "extra/readme.md",
    "extra/synthdid.html",
    "LICENSE"
  ],
  "_cranurl": false,
  "_authors": [
    {
      "name": "David A. Hirshberg",
      "email": "david.a.hirshberg@gmail.com",
      "role": [
        "cre"
      ]
    }
  ],
  "_exports": [
    "did_estimate",
    "estimate_dgp",
    "lindsey_density_estimate",
    "panel.matrices",
    "sc_estimate",
    "simulate_dgp",
    "synthdid_controls",
    "synthdid_effect_curve",
    "synthdid_estimate",
    "synthdid_placebo",
    "synthdid_placebo_plot",
    "synthdid_plot",
    "synthdid_rmse_plot",
    "synthdid_se",
    "synthdid_units_plot",
    "timesteps"
  ],
  "_datasets": [
    {
      "name": "california_prop99",
      "title": "California proposition 99",
      "object": "california_prop99",
      "class": [
        "data.frame"
      ],
      "fields": [
        "State",
        "Year",
        "PacksPerCapita",
        "treated"
      ],
      "rows": 1209,
      "table": true,
      "tojson": true
    },
    {
      "name": "CPS",
      "title": "CPS",
      "object": "CPS",
      "class": [
        "data.frame"
      ],
      "fields": [
        "state",
        "year",
        "log_wage",
        "hours",
        "urate",
        "min_wage",
        "open_carry",
        "abort_ban"
      ],
      "rows": 2000,
      "table": true,
      "tojson": true
    },
    {
      "name": "PENN",
      "title": "PENN",
      "object": "PENN",
      "class": [
        "data.frame"
      ],
      "fields": [
        "country",
        "year",
        "log_gdp",
        "dem",
        "educ"
      ],
      "rows": 5328,
      "table": true,
      "tojson": true
    }
  ],
  "_help": [
    {
      "page": "ar2_correlation_matrix",
      "title": "compute the correlation matrix of a time series generated by an ar2 model",
      "topics": [
        "ar2_correlation_matrix"
      ]
    },
    {
      "page": "california_prop99",
      "title": "California proposition 99",
      "topics": [
        "california_prop99"
      ]
    },
    {
      "page": "CPS",
      "title": "CPS",
      "topics": [
        "CPS"
      ]
    },
    {
      "page": "decompose_Y",
      "title": "Decompose Y into components F, M, and E as described in Section 3.1.1 also computes a set of 'unit factors': the first rank left singular vectors from SVD(Y)",
      "topics": [
        "decompose_Y"
      ]
    },
    {
      "page": "did_estimate",
      "title": "synthdid_estimate for diff-in-diff estimates. Takes all the same parameters, but by default, passes options to use the diff-in-diff estimator",
      "topics": [
        "did_estimate"
      ]
    },
    {
      "page": "estimate_dgp",
      "title": "Estimates the DGP parameters used in the placebo studies in Sections 3 and 5 of the synthetic difference in differences paper. Described there in Section 3.1.1.",
      "topics": [
        "estimate_dgp"
      ]
    },
    {
      "page": "fit_ar2",
      "title": "Estimate ar2 coefficients from iid time series",
      "topics": [
        "fit_ar2"
      ]
    },
    {
      "page": "format.synthdid_estimate",
      "title": "Format a synthdid object",
      "topics": [
        "format.synthdid_estimate"
      ]
    },
    {
      "page": "lindsey_density_estimate",
      "title": "Computes a density estimator by smoothing a histogram using Poisson regression. Implementation of \"Lindsey's method\", as descrbied in Chapter 10 of \"Computer age statistical inference: algorithms, evidence, and data science' by Bradley Efron and Trevor Hastie (2016).",
      "topics": [
        "lindsey_density_estimate"
      ]
    },
    {
      "page": "panel.matrices",
      "title": "Convert a long (balanced) panel to a wide matrix",
      "topics": [
        "panel.matrices"
      ]
    },
    {
      "page": "PENN",
      "title": "PENN",
      "topics": [
        "PENN"
      ]
    },
    {
      "page": "plot.synthdid_estimate",
      "title": "Plot a synthdid object",
      "topics": [
        "plot.synthdid_estimate"
      ]
    },
    {
      "page": "print.synthdid_estimate",
      "title": "Print a synthdid object",
      "topics": [
        "print.synthdid_estimate"
      ]
    },
    {
      "page": "randomize_treatment",
      "title": "randomize treatment to n units with probability pi then if the number of treated units is zero, assign treatment to one unit uniformly at random and if the number of treated units exceeds a cap, remove treatment uniformly at random so it is exactly that cap",
      "topics": [
        "randomize_treatment"
      ]
    },
    {
      "page": "sc_estimate",
      "title": "synthdid_estimate for synthetic control estimates. Takes all the same parameters, but by default, passes options to use the synthetic control estimator By default, this uses only 'infinitesimal' ridge regularization when estimating the weights.",
      "topics": [
        "sc_estimate"
      ]
    },
    {
      "page": "simulate_dgp",
      "title": "Simulates data from DGPs used in the placebo studies in Sections 3 and 5 of the synthetic difference in differences paper. Described there in Section 3.1.1.",
      "topics": [
        "simulate_dgp"
      ]
    },
    {
      "page": "sparsify_function",
      "title": "A function mapping a numeric vector to a (presumably sparser) numeric vector of the same shape to be passed onto synthdid_estimate.",
      "topics": [
        "sparsify_function"
      ]
    },
    {
      "page": "summary.synthdid_estimate",
      "title": "Summarize a synthdid object",
      "topics": [
        "summary.synthdid_estimate"
      ]
    },
    {
      "page": "synthdid_controls",
      "title": "Outputs a table of important synthetic controls and their corresponding weights, sorted by weight. The table is truncated to exclude synthetic controls that do not matter for any estimate - for each estimate, the truncated controls may have total weight no larger that 1-mass.",
      "topics": [
        "synthdid_controls"
      ]
    },
    {
      "page": "synthdid_effect_curve",
      "title": "Outputs the effect curve that was averaged to produce our estimate",
      "topics": [
        "synthdid_effect_curve"
      ]
    },
    {
      "page": "synthdid_estimate",
      "title": "Computes the synthetic diff-in-diff estimate for an average treatment effect on a treated block.",
      "topics": [
        "synthdid_estimate"
      ]
    },
    {
      "page": "synthdid_placebo",
      "title": "Computes a placebo variant of our estimator using pre-treatment data only",
      "topics": [
        "synthdid_placebo"
      ]
    },
    {
      "page": "synthdid_placebo_plot",
      "title": "For our estimator and a placebo, plots treated and synthetic control trajectories and overlays a 2x2 diff-in-diff diagram. Requires ggplot2",
      "topics": [
        "synthdid_placebo_plot"
      ]
    },
    {
      "page": "synthdid_plot",
      "title": "Plots treated and synthetic control trajectories and overlays a 2x2 diff-in-diff diagram of our estimator. In this overlay, the treatment effect is indicated by an arrow. The weights lambda defining our synthetic pre-treatment time period are plotted below. If a list of estimates is passed, plots all of them. By default, does this in different facets. To overlay estimates in the same facet, indicate a facet for each estimator in the argument 'facet'.",
      "topics": [
        "synthdid_plot"
      ]
    },
    {
      "page": "synthdid_rmse_plot",
      "title": "A diagnostic plot for sc.weight.fw.covariates. Plots the objective function, regularized RMSE, as a function of the number of Frank-Wolfe / Gradient steps taken. Requires ggplot2",
      "topics": [
        "synthdid_rmse_plot"
      ]
    },
    {
      "page": "synthdid_se",
      "title": "Calculate the standard error of a synthetic diff in diff estimate. Deprecated. Use vcov.synthdid_estimate.",
      "topics": [
        "synthdid_se"
      ]
    },
    {
      "page": "synthdid_units_plot",
      "title": "Plots unit by unit difference-in-differences. Dot size indicates the weights omega_i used in the average that yields our treatment effect estimate. This estimate and endpoints of a 95% CI are plotted as horizontal lines. Requires ggplot2",
      "topics": [
        "synthdid_units_plot"
      ]
    },
    {
      "page": "timesteps",
      "title": "Get timesteps from panel matrix Y",
      "topics": [
        "timesteps"
      ]
    },
    {
      "page": "vcov.synthdid_estimate",
      "title": "Calculate Variance-Covariance Matrix for a Fitted Model Object",
      "topics": [
        "vcov.synthdid_estimate"
      ]
    }
  ],
  "_readme": "https://github.com/synth-inference/synthdid/raw/HEAD/README.md",
  "_rundeps": [
    "mvtnorm"
  ],
  "_score": 6.940075990605265,
  "_indexed": false,
  "_nocasepkg": "synthdid",
  "_universes": [
    "mikenguyen13"
  ],
  "_indexurl": "https://skranz.r-universe.dev/synthdid",
  "_binaries": [
    {
      "r": "4.7.0",
      "os": "linux",
      "version": "0.0.9",
      "date": "2026-11-26T01:28:15.000Z",
      "distro": "resolute",
      "commit": "70c1ce3eac58e28c30b67435ca377bb48baa9b8a",
      "fileid": "https://r2.ropensci.org/1abb3391a59828ef161658a53277d25f443a0e464df84813be8a386016ca5f2a",
      "status": "failure",
      "check": "ERROR",
      "buildurl": "https://github.com/r-universe/mikenguyen13/actions/runs/45735440357"
    },
    {
      "r": "4.6.2",
      "os": "linux",
      "version": "0.0.9",
      "date": "2026-11-26T01:27:57.000Z",
      "distro": "resolute",
      "commit": "70c1ce3eac58e28c30b67435ca377bb48baa9b8a",
      "fileid": "https://r2.ropensci.org/48e994a5b1917e81a70d0542e4ed32886ad84e20bf7cde34f35c88bd3a019654",
      "status": "failure",
      "check": "ERROR",
      "buildurl": "https://github.com/r-universe/mikenguyen13/actions/runs/45735440357"
    },
    {
      "r": "4.5.3",
      "os": "mac",
      "version": "0.0.9",
      "date": "2026-11-26T01:27:52.000Z",
      "commit": "70c1ce3eac58e28c30b67435ca377bb48baa9b8a",
      "fileid": "https://r2.ropensci.org/38356a0b620ddb918a9d304bdb2bd3a5ca2a94a91b24b68f35fc503e54495c1b",
      "status": "failure",
      "check": "ERROR",
      "buildurl": "https://github.com/r-universe/mikenguyen13/actions/runs/45735440357"
    },
    {
      "r": "4.6.2",
      "os": "mac",
      "version": "0.0.9",
      "date": "2026-11-26T01:28:16.000Z",
      "commit": "70c1ce3eac58e28c30b67435ca377bb48baa9b8a",
      "fileid": "https://r2.ropensci.org/7a79abfa03b83852653281e4d0a83d005213d05ef91447340927743bc2fc84ca",
      "status": "failure",
      "check": "ERROR",
      "buildurl": "https://github.com/r-universe/mikenguyen13/actions/runs/45735440357"
    },
    {
      "r": "4.6.0",
      "os": "wasm",
      "version": "0.0.9",
      "date": "2026-11-26T01:28:01.000Z",
      "commit": "70c1ce3eac58e28c30b67435ca377bb48baa9b8a",
      "fileid": "https://r2.ropensci.org/4c8e3663030e8ede6ca6b6810fd826ddcd481a9551145bdebff34a48011458f0",
      "status": "success",
      "buildurl": "https://github.com/r-universe/mikenguyen13/actions/runs/45735440357"
    },
    {
      "r": "4.7.0",
      "os": "win",
      "version": "0.0.9",
      "date": "2026-11-26T01:27:20.000Z",
      "commit": "70c1ce3eac58e28c30b67435ca377bb48baa9b8a",
      "fileid": "https://r2.ropensci.org/3e3d0b9605fd9cfd795ff62c113cc623e5869933479641b65e45b3578aceeea7",
      "status": "failure",
      "check": "ERROR",
      "buildurl": "https://github.com/r-universe/mikenguyen13/actions/runs/45735440357"
    },
    {
      "r": "4.5.3",
      "os": "win",
      "version": "0.0.9",
      "date": "2026-11-26T01:27:23.000Z",
      "commit": "70c1ce3eac58e28c30b67435ca377bb48baa9b8a",
      "fileid": "https://r2.ropensci.org/83cfdd4d0dabfa26e325adfc2d8c6bbaf625259a8e6b2895b26332e6a69b182d",
      "status": "failure",
      "check": "ERROR",
      "buildurl": "https://github.com/r-universe/mikenguyen13/actions/runs/45735440357"
    },
    {
      "r": "4.6.2",
      "os": "win",
      "version": "0.0.9",
      "date": "2026-11-26T01:27:37.000Z",
      "commit": "70c1ce3eac58e28c30b67435ca377bb48baa9b8a",
      "fileid": "https://r2.ropensci.org/2d4a424707521ab7d59c10680c63166e4f2f48380dcee1ac99ab2769033b05e0",
      "status": "failure",
      "check": "ERROR",
      "buildurl": "https://github.com/r-universe/mikenguyen13/actions/runs/45735440357"
    }
  ]
}