Description Usage Arguments Value References Examples

View source: R/ipw_did_panel.R

`ipw_did_panel`

is used to compute inverse probability weighted (IPW) estimators for the ATT
in difference-in-differences (DiD) setups with panel data. IPW weights are not normalized to sum up to one,
that is, the estimator is of the Horwitz-Thompson type.

1 2 3 4 5 6 7 8 9 10 11 |

`y1` |
An |

`y0` |
An |

`D` |
An |

`covariates` |
An |

`i.weights` |
An |

`boot` |
Logical argument to whether bootstrap should be used for inference. Default is FALSE. |

`boot.type` |
Type of bootstrap to be performed (not relevant if |

`nboot` |
Number of bootstrap repetitions (not relevant if |

`inffunc` |
Logical argument to whether influence function should be returned. Default is FALSE. |

A list containing the following components:

`ATT` |
The IPW DID point estimate. |

`se` |
The IPW DID standard error |

`uci` |
Estimate of the upper bound of a 95% CI for the ATT |

`lci` |
Estimate of the lower bound of a 95% CI for the ATT |

`boots` |
All Bootstrap draws of the ATT, in case bootstrap was used to conduct inference. Default is NULL |

`att.inf.func` |
Estimate of the influence function. Default is NULL |

`call.param` |
The matched call. |

`argu` |
Some arguments used (explicitly or not) in the call (panel = TRUE, normalized = FALSE, boot, boot.type, nboot, type="ipw") |

Abadie, Alberto (2005), "Semiparametric Difference-in-Differences Estimators", Review of Economic Studies, vol. 72(1), p. 1-19, doi: 10.1111/0034-6527.00321

Sant'Anna, Pedro H. C. and Zhao, Jun. (2020), "Doubly Robust Difference-in-Differences Estimators." Journal of Econometrics, Vol. 219 (1), pp. 101-122, doi: 10.1016/j.jeconom.2020.06.003

1 2 3 4 5 6 7 8 9 10 11 | ```
# Form the Lalonde sample with CPS comparison group
eval_lalonde_cps <- subset(nsw, nsw$treated == 0 | nsw$sample == 2)
# Select some covariates
covX = as.matrix(cbind(eval_lalonde_cps$age, eval_lalonde_cps$educ,
eval_lalonde_cps$black, eval_lalonde_cps$married,
eval_lalonde_cps$nodegree, eval_lalonde_cps$hisp,
eval_lalonde_cps$re74))
# Implement (unnormalized) IPW DID with panel data
ipw_did_panel(y1 = eval_lalonde_cps$re78, y0 = eval_lalonde_cps$re75,
D = eval_lalonde_cps$experimental,
covariates = covX)
``` |

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.