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
Time Fixed Effects EsttabDear all, I would like to add a line with the word "Yes" if time fixed effect is used. Unfortunatel…
Difference-in-difference with interactionsHi, I'm trying to estimate a straight forward Difference-in-Difference model to find the impact of …
Check if two exposure varibales are independent of each otherHi, Apologies if this is very obvious, I've managed to get confused about it. If i want to check if…
Invalid syntax error when combining foreach and logout ttable2Hi, I am trying to output the ttable2 results of different groups. The code I am writing is as foll…
Count distinct digits of observationsDear statalists, I would like to count the number of digits an observation has as follows: Numbe…
Subscribe to:
Post Comments (Atom)
0 Response to Collapse all values of one string variable to one cell per group
Post a Comment