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
Splitting StringHi, I am trying to split the movie names from its year of release. Most of the years are put in pare…
Invalid name Error when using postHi Statalist, I was running regressions in loop and trying to store coefficients. I used post for t…
Runby corr, error: store_data(): 3900 unable to allocate real <tmp>Hello, I am working on a project where I need to runby the corr program and return the correlation …
Exporting nbreg regression (negative binomial regression) to include alphaHow can I export a nbreg regression to include the alpha value and show its significance using the s…
tnbreg does not convergeI am trying to run a Zero-Truncated Negative Binomial Regression with the attached data. The code I …
Subscribe to:
Post Comments (Atom)
0 Response to Appending Columns
Post a Comment