This repository contains data and code from:
Ramsey, D.S.L., Forsyth, D.M., Wright, E., McKay, M., and Westbrooke, I. (2018). "Using propensity scores for causal inference in ecology: options, considerations and a case study" Methods in Ecology and Evolution
File descriptions:
Propensity_simulations.R – R code used to conduct Monte Carlo simulations of propensity score methods. Uses functions defined in propensity_simulation_functions.R
Propensity_simulation_functions.R – R functions used to perform propensity score simulations and helper functions to calculate IPTW weights calc.pswts() and weights from full matching get.match.weights() that target either the ATE or ATT.
Propensity_TreeCover_Analysis.R – R code used to estimate effects of possum control on canopy tree condition using propensity scores. Uses data provided in Tree_Cover_data.csv.
The simulation script require packages optmatch, tidyverse, survey, forcats and RColorBrewer while the tree cover analysis requires in addition, cobalt , readr and treatsens.