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
oaxaca: reference categoryDear Statalisters, I am using the Blinder-Oaxaca decomposition with the following code: Code: oa…
Can I cite the name of the do file?In the do file, I want to save the data using the name of the do flle, how to cite it using macros? …
calculating r square for a model estimated with multiply imputed data (mi estimate)Dear all, I would very much appreciate your help with calculating r-squared for models estimated wi…
Panel data mapHi, I want to map my panel data neatly. I've id & t. I've 5 agricultural crop variables. I've …
How can I count the observations by year (intervals) AND by country?Good day, So I have a data set (panel data) counting lots of variables. But for now I am only inter…
Subscribe to:
Post Comments (Atom)
0 Response to Create pairs within groups
Post a Comment