.makeWide | R Documentation |
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)
data |
A data frame containing the input data. |
id |
The name of the variable in |
time |
The name of the time period variable (as a string). |
outcome |
The name of the outcome variable (as a string). |
treatment |
The name of the variable in |
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.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.