I wonder if there is a command that can do the following:
1. I have a list of 7 numbers, say (2,5,7,8,11,13,14)
2. I want to generate a variable call "v1" with observations = 100, the values of the 100 observations are randomly assigned from the 7 numbers in #1. In other words, the values of the 100 observations can only be (2,5,7,8,11,13,14).
If it possible to generate such variable in stata?
Related Posts with A question on randomization
collapse or Roger Newman's xcollapse with string variablesTried help (and the help for xcollapse) but can't get an answer that makes sense to me. I have three…
Foreach and gen ? Help please(Don't speak english, Hope you can understand) Hi, I was wondering if is possible making a loop to f…
Using foreach for two set of groupsDear All, I have two groups of countries and pairwise data- importers and exporters. Eg. Importers=…
Using Weights for countries in Survey DatasetHello everyone, I am working with 2 waves (5 and 6) of World Value Survey in Stata 15 and I am anal…
Combine two strings with entry that has more informationDear statalists, I have two variables that capture the same thing but with differing precision. One…
Subscribe to:
Post Comments (Atom)
0 Response to A question on randomization
Post a Comment