Dear Stata supporters,
I am currently working on my master thesis and therefore want to use STATA. However, currently I hit a wall with my progress. Unfortunately I am not experienced enough to solve this problem by myself, neither after searching through this forum. Hopefully someone can help me out.
Currently my data is listed as follow:
Year Country VarX
1999 1 9
1999 2 99
1999 3 999
2000 1 8
2000 2 88
2000 3 888
Originally for more than 4500 observations. However, I would like to make pairs for country per year. Which should look as follow:
Year Country Country VarX VarX
1999 1 2 9 99
1999 1 3 9 999
1999 2 1 99 9
1999 2 3 99 999
1999 3 1 999 9
1999 3 2 999 99
2000 1 2 8 88
2000 1 3 8 888
And everything that comes after...
How can I make this happen? can someone help me out.
Related Posts with Create pairs within groups
Constructing Gini Index for Household dataDear All I'm computing the Gini coefficient in Stata 16 with the" ineqdeco" command. I'm using panel…
poisson regression (ppmlhdfe) with multiplicative errorIs there a way to force ppmlhdfe to use multiplicative error term instead of additive? I wan to run…
OLS vs FE vs RE? Tests results conflicts.Dear Stata specialists, Hope you can help me solve my problem. I recently run OLS, FE, RE for my p…
Creating a combined graphHi, I'm struggling to get this right. I have 2 variables that I want to show on a single graph. Fir…
estimating 5 year survivalHi, I have a dataset with survival months and event (dead/alive). I have been able to stset it and c…
Subscribe to:
Post Comments (Atom)
0 Response to Create pairs within groups
Post a Comment