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
Pearson correlation matrix with multiple significance starsHi Statalisters, I'm trying to present Pearson's correlation matrix with significance stars at leve…
Problems with updating Stata and dragging and dropping filesProblem #1. Stata update used to work, but now when it relaunches nothing happens. Problem #2. Stat…
Regression with year and country fixed effectsHi there, First of all I am new to this forum and I've been trying to find a relatable post but was…
Principal Component AnalysisHello, I am carrying out a Principal Component Analysis on a rather large dataset (6500 observation…
New Variable carrying all used Company Names to create ID variableHello, I find it difficult to put my problem into a simple heading so the name of the thread might …
Subscribe to:
Post Comments (Atom)
0 Response to Create pairs within groups
Post a Comment