Say I have the following data set:
id var1
1 a
1 b
1 c
2 a
2 d
3 a
Is there a way to collapse this to the following?
id var1
1 a; b; c
2 a; d
3 a
Related Posts with Collapse all values of one string variable to one cell per group
graph add vertical line using value in macro variableI am using Stata 13 I want to develop code to add a single vertical line on a graph using a value ob…
interaction effects LPM vs logisticHi! I am trying to understand why my interaction effects get different signs when using an logistic…
graph add vertical line using value in macro variableI am using Stata 13 I want to develop code to add a single vertical line on a graph using a value ob…
Multilevel/Hierarchical models and clustered-robust standard errorsMultilevel/hierarchical model with clustered-robust standard errors. I have reviewed various posts o…
Observations in new variable that shouldn't be includedHello, I am trying to make a new variable with the following command Code: gen gift_group_test = …
Subscribe to:
Post Comments (Atom)
0 Response to Collapse all values of one string variable to one cell per group
Post a Comment