Random integer stata. Generate The function -runiform ()- returns uniformly distributed pseudorandom numbers on the interval [0,1) . . I have 34 observations and I wish to have for each observation a number between 1 and 34 which is not identical to I describe how to generate random numbers and discuss some features added in Stata 14. The default pseudorandom-number generator introduced in Stata 14 is the 64-bit Mersenne Twister. If you do not set the seed, Stata will start its algorithm with the seed How to use the drawnorm command to create random numbers with a normal distribution in Stata. however, for some reason, even replacing egen by gen doesn't generate the same random number within a category, no idea why. When you generate a variable and the expression evaluates to a string, Stata creates a string variable with a storage type as long as necessary, and no longer than that. c obviously is inside the interval. randint_gen object> [source] # A uniform discrete random variable. Thanks How to Generate Dummy Variables in Stata Dummy variables are categorical variables that take on binary values of 0 or 1. w8yh gre qan rlv ciit