Guidance for using propensity score matching in R I am new to programming as well as econometrics and would like to ask some guidance for learning.
I am planning to calculate the effectiveness of a public works scheme in country A. By effectiveness I mean the rate of success by which participants were able to return to the open labour market compared to registered job seekers who did not participate in the programme.
I have found out from economists that for this type of analysis I can use propensity score matching (PSM) if I have panel microdata. I have already submitted a data request to public authorities, and I expect to receive a tidy, unblanaced dataset with several thousand observations for the past three years.
I was also recommended some books from which I could learn how to conduct the analysis (Woolridge 2012, World Bank 2009). All of these use Stata, but, if possible, I would prefer to stay with R that I have been learning since the past year. Unfortunately, however, I have not found a book yet that would comprehensively treat PSM in R (eg. among the useR series).
I am a beginner in R. At the moment, I can manipulate data by indexing, but not yet by loops. In order to avoid the risk of taking on something that I am unable to do, I would like to ask whether I can expect to conduct such an analysis by basic R programming skills, and reading about packages on panel data (eg. plm) and PSM (eg. MatchIt), or it is essential that I also learn some more advanced skills before, such as loops, apply, or writing functions? If the latter, then concretely which ones?
 A: I don't mean to get your hopes down, but expecting "tidy data" from "local (government) authorities" is probably a pipe dream.  Government built/owned  datasets are usually a mess.  If I were you, I'd spend a day learning the basics of R with any of the free web-tutorials that are available.  Outside of the classroom, I've never worked with a clean dataset -- especially ones that came from government entities -- that didn't require some cleaning and data manipulation before the analysis began.  That way you'll be fairly well prepared to handle any data issues that come your way (which there will almost certainly be some, even if promised a tidy dataset).  I'm not sure you'll need to use looping in R, since R has vectorized operations which eliminates the need for most looping.
The books you are using are probably books by economists.  Economists tend to use stata more often, so, I'm guessing that's the why you find these books are using stata.  Try looking for statistics books, by actual statisticians on the subject of propensity scores, if you'd like to gain a better understanding of both the theory of propensity scores as well as learn how to apply them in R (or SAS).  I'd recommend the following books for you which contain plenty of R examples: 


*

*[Propensity Score Analysis, 2nd.  Guo, Shenyand, and Mark W. Fraser.]

*Propensity Score Analysis: Fundamentals and Developments. Pan Wei and Haiyan Bai PhD (Editors).

*Using Propensity Scores in Quasi-Experimental Designs.  William M. Holmes. (a bit more basic/introductory book).

*Practical Propensity Score Methods Using R.    Walter L. Leite.


With regard to packages, in R, I really like the twang package.  It was developed by the statistics group at RAND and in developing the package, they put together a lot of really great resources to train others how to use the package.  Since it was federally funded, I believe, you can access these materials and learn the package for free.  This RAND website contains documentation, examples, and even video instruction on how to use the package.  You can even match the methods they teach to papers that have been published so you can see how they've incorporated the findings from the package into their public research.  From personal experience, I can tell you that without these materials, it would have taken me significantly longer to complete my thesis which incorporated their boosted regression trees to obtain propensity scores.  The downside to this is that the original author of the package is no longer with RAND, so I'm not sure if it is being well-maintained, although, I've thought about making some enhancements to the package myself.
In addition, there is some evidence in the literature that shows boosted regression trees (used in twang) outperform the propensity matching of other propensity score models (e.g. logistic regression).  
Lastly, I agree with Frank's suggestion of thinking through the problem.  You don't necessarily have to use propensity score matching.  There are other causal methods that might suit your needs better and build a stronger case for your argument.  Consider other casual methods such as what economists like to call Fixed Effects Regression (not to be confused by what statisticians called fixed effects) or interrupted time series methods might work too.
A: MatchIt, Matching, twang, and CBPS are all great packages for propensity score analysis. For balance assessment, I recommend cobalt. If your data are clean, I can't imagine what type of looping you might have to do. You might have to do indexing, but these packages are designed pretty well to prevent you from having to do too much work outside of running the important functions. These packages (except CBPS) all have good vignettes explaining how to use the functions for propensity score analysis.
