Description Usage Arguments Details Value Examples

Calculates results for a placebo test

1 2 3 4 5 6 7 8 9 | ```
placeboTest(
pm.obj,
data.in,
lag.in = NULL,
number.iterations = 1000,
confidence.level = 0.95,
plot = FALSE,
...
)
``` |

`pm.obj` |
an object of class |

`data.in` |
data.frame with the original data |

`lag.in` |
integer indicating earliest the time period(s) in the future for which the placebo test change in outcome will be calculated. Calculations will be made over the period t - max(lag) to t-2, where t is the time of treatment. The results are similar to those returned by PanelEstimate, except t-1 is used as the period of comparison, rather than the lead window. |

`number.iterations` |
integer specifying the number of bootstrap iterations |

`confidence.level` |
confidence level for the calculated standard error intervals |

`plot` |
logical indicating whether or not a plot should be generated, or just return the raw data from the calculations |

`...` |
extra arguments to be passed to plot |

Calculate the results of a placebo test, looking at the change in outcome at time = t-1, compared to other pre-treatment periods in the lag window.

list with 2 elements: "estimates", which contains the point estimates for the test and "bootstrapped.estimates", containing the bootstrapped point estimates for the test for each specified lag window period.

1 2 3 4 5 6 7 8 | ```
PM.results <- PanelMatch(lag = 4, time.id = "year", unit.id = "wbcode2",
treatment = "dem", refinement.method = "mahalanobis",
data = dem, match.missing = TRUE,
covs.formula = ~ I(lag(tradewb, 1:4)),
size.match = 5, qoi = "att",
outcome.var = "y", lead = 0:4, forbid.treatment.reversal = FALSE,
placebo.test = TRUE)
placeboTest(PM.results, data.in = dem, number.iterations = 100, plot = FALSE)
``` |

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.