I have 4 different variable names that I want to collapse to a single column, though keep the identifying variable the same for the other variables.
Data Currently looks like this:
ID var1 var2 var3 var4
1 a1 a2 a3 a4
2 b1 b2 b3 b4
3 c1 c2 c3 c4
And I want to make it look like this:
ID newvar
1 a1
1 a2
1 a3
1 a4
2 b1
2 b2
2 b3
2 b4
3 c1
3 c2
3 c3
3 c4
THanks!
Related Posts with Appending Columns
Variable section for panel dataHi. I have a balanced panel data for a holdout sample of 120 with 12 variables and a time period of …
any command like -stack- ?Dear Stata users, I have a task in hand that seems to be accomplished using -stack-, but it failed.…
Interpreting coefficients in an interaction between a log and dummy variableHi Statalist, I am having trouble interpreting my regression that includes an interaction term with…
.do file protectionHi ! Is there anyway .do file can be protected? …
Robustness ChecksHi, I'm assessing the disability wage gap at two points in time using the Oaxaca-Blinder decomposit…
Subscribe to:
Post Comments (Atom)
0 Response to Appending Columns
Post a Comment