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
Adding a title above the forest plot column in forestplotHi, I am trying to work out how to add a title above the actual forest plot itself. I have used adm…
Choice ModelsDear all, I am learning how to estimate Choice models in Stata 16. I have the following data example…
Stata/MP 16 memory issueHi, I am having trouble with memory. My file size is 86mb and I have a memory of 8GM. I am using Sta…
Color two bars in graph barcode_ccaa top1_2003m top1_2015m 0 17.564796 19.249368 1 15.872214 14.858478 2 15.903887 17.305883 3 …
Stata/MP 16 memory issueHi, I am having trouble with memory. My file size is 86mb and I have a memory of 8GM. I am using Sta…
Subscribe to:
Post Comments (Atom)
0 Response to Create pairs within groups
Post a Comment