This internal helper function transforms data from a long format, where each row represents an observation for a specific unit and time, to a wide format, where each row represents a time period and each column represents a unit's outcome. It specifically focuses on separating treated and untreated units.
.makeWide(data, id, time, outcome, treatment)A data frame in wide format, where each row corresponds to a time period, and columns include the time variable, the treatment indicator, and the outcome values for each treated unit and all untreated units.
A data frame containing the input data.
The name of the variable in data that identifies units (as a string).
The name of the time period variable (as a string).
The name of the outcome variable (as a string).
The name of the variable in data that indicates treatment status (as a string).