A function to calculate outcomes for units in a particular time period `tp` in a panel data setting (this function can also be used to recover covariates, etc. in the first period).
Arguments
- df
the data.frame used in the function
- tp
The time period for which to get the outcome
- idname
name of column that holds the unit id
- yname
name of column containing the outcome (or other variable) for which to calculate its outcome in the immediate pre-treatment period
- tname
name of column that holds the time period