Computes Powell's Generalized Synthetic Control Estimator

Computes the generalized synthetic control estimator described in Powell (2017) . Provides both point estimates, and hypothesis testing.

The goal of pgsc is to provide an estimation and testing framework for Powell's Generalized Synthetic Control method. This provides consistent estimates in the presence of unobserved spatially-correlated factors in a panel. Please see the vignette for further details and an extended example.


You can install pgsc from github with:



This is a basic example which provides estimation and testing for a dataset with omitted variables that cannot be addressed by time and unit fixed effects. Please see the vignette for further details on this example and other options.

#' data("pgsc.dta")
#' library(plm)
#' pan <- plm( y ~ D1 + D2 + X1 + X2 + X3, pgsc.dta, effect = 'twoways', index = c('n','t'))
#' summary(pan)
#'    # Failure of panel estimation: the true coefficients on D1, D2 are c(1,2), 
#'    # which are not recovered due to omitted variables which are spatially
#'    #  correlated.  The "twoway" (time/unit) fixed effects cannot pick this up.
#' sol <- pgsc(pgsc.dta, dep.var = 'y', indep.var = c('D1','D2'), 
#'              b.init = c(0,0), method='twostep.indiv' )
#' summary(sol)
#'    # The unrestricted estimation. 
#' g.i <- function(b) b[1] ; g.i.grad <- function(b) c(1,0)
#' sol.r <- pgsc(pgsc.dta, dep.var = 'y', indep.var = c('D1','D2'), 
#'              b.init = sol$b, method='twostep.indiv', g.i=g.i, g.i.grad=g.i.grad )
#'    # Restricted estimation under the hypothesis that b[1]=0
#' summary(sol.r)
#' wald <- pgsc.wald.test( pgsc.dta, 'y', indep.var = c('D1','D2'), sol.r )
#' summary(wald)
#' plot(wald)
#'    # Testing the hypothesized restriction.  It is comfortably rejected.

You can access the vignette with

#' browseVignettes('pgsc')


PGSC 1.0

First release of package. Provides:

  • Functionality:
    • Estimation via pgsc
    • Restricted estimation, also via pgsc
    • Hypothesis testing via pgsc.wald.test
  • Documentation:
    • A README with a very short example
    • A vignette which expands the example
    • Man pages for the exposed functions
  • Data:
    • A synthetic dataset pgsc.dta, used in examples

Reference manual

It appears you don't have a PDF plugin for this browser. You can click here to download the reference manual.


1.0.0 by Philip Barrett, 3 years ago

Browse source code at

Authors: Philip Barrett

Documentation:   PDF Manual  

GPL-2 license

Depends on Rcpp, nloptr, reshape2

Suggests knitr, rmarkdown, plm

Linking to Rcpp, RcppArmadillo

See at CRAN