panelMatrices | R Documentation |
Convert a long panel to wide matrix (cleaner data.table version)
panelMatrices(dt, unit_id, time_id, treat, outcome)
dt |
data.table in long panel format |
unit_id |
unit id name |
time_id |
time id name |
treat |
treatement name |
outcome |
outcome name |
list with treatment matrix W, outcome matrix Y, N0 (number of control units), and T0 (number of untreated periods)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.