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
Forecast estimation using rolling windowsHi, I am currently working on my MSc Thesis Finance. I am trying to replicate the Lewellen regressi…
Country Fixed Effect - Effect of Independent on Dependent VariableHello everyone, for my Master Thesis, I am analyzing the effect of financial crises on earnings man…
Interaction between binary and continuous variables leading to duplicate results in regression tableHello all, I have calculated -xtlogit,re- for my unbalanced panel (in Stata 14.2) because my depende…
random effect estimates for all multilevel level regression modelHello, My question is on estimating coefficients for random effects in mixed effect models. I am ne…
Durbin-Watson tests in Prais-Winsten output: transformed lower than originalDear all I'm using Stata 17.1. My dataset is panel unbalanced, with N=340. Observations correspond t…
Subscribe to:
Post Comments (Atom)
0 Response to Appending Columns
Post a Comment