| cs2panel | R Documentation |
Turn repeated cross sections data into panel data by imposing rank invariance; does not require that the inputs have the same length
cs2panel(cs1, cs2, yname)
cs1 |
data frame, the first cross section |
cs2 |
data frame, the second cross section |
yname |
the name of the variable to calculate difference for (should be the same in each dataset) |
the change in outcomes over time
cs1 <- data.frame(y = rnorm(100))
cs2 <- data.frame(y = rnorm(100, mean = 1))
dy <- cs2panel(cs1, cs2, "y")
mean(dy) ## approx 1
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.