Hello, I am using STATA 14 and would like to generate some random numbers that have a specific mean and standard deviation but fall with a range.

I used

gen x = rnormal (m, s) and the mean and SD were spot on but the range contains negative numbers. In this case I need the numbers to range from a minimum of 5.98 to a maximum of 9. Just to test, I used runiform( ) as it allows a range but the SD was off. Any help is welcomed.

Thanks in advance!