did_longer | R Documentation |
Convert a data.frame to long format.
did_longer(
data,
outcomes = c("Y0", "Y1"),
outcome = "Y",
names_to = "var",
timevar = "time"
)
data |
Dataframe of data to convert to long format. |
outcomes |
Character vector of base and final variables. |
outcome |
Name that will be used for the single outcome variable. |
names_to |
Name that will be used for the name variable. |
timevar |
Name that will be used for the time variable. |
Convert a data.frame to long format. A tie column will be added with 0 for baseline and 1 for final.
Dataframe in long format.
did_linear did_loglinear did_logistic
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.