when learning the basic Stata operations, I want to create a pseudo data set to play with. the data set (panel data) should be something like this:
so I guess what I need to do for the three variables is:
for the year variable, create a number sequence and repeat it;
for the country variable, create a string macro and repeat it;
for the growth variable, create a series of random numbers with the random number generators.
This should be quite easy in other programming languages, but how could I manage this in Stata?
more generally, links about how to manage this kind of works are much appreciated. I googled, but nothing relevant came up. (might be I'm searching for the wrong key word)
year | country | growth |
1991 | UK | 0.1 |
1991 | US | 0.2 |
1992 | UK | 0.3 |
1992 | US | 0.4 |
1993 | UK | 0.5 |
for the year variable, create a number sequence and repeat it;
for the country variable, create a string macro and repeat it;
for the growth variable, create a series of random numbers with the random number generators.
This should be quite easy in other programming languages, but how could I manage this in Stata?
more generally, links about how to manage this kind of works are much appreciated. I googled, but nothing relevant came up. (might be I'm searching for the wrong key word)
Comment