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!
Related Posts with Generate random numbers with specific mean and standard deviation within a range
foreach num in numlist - reports error (numlist not found) // what's my syntax mistake?Hello, I would like to run the following loop but I get the message: Code: femnumlist not found …
Generating predicted probabilities of random effects after melogitHello, My question is on estimating coefficients for random effects in mixed effect models. I am bu…
Generating variables in migration panelsHi All, This is my first post, so excuse me breaking any rules/conventions. I'm trying to generate…
tabout command generating an easy cross table in wordHey, I try to create an easy cross table. First, I used the tabulate command: tabulate variable1 var…
Exporting Mlogit Marginal Effects to ExcelI am trying to export marginal effects output for mlogit into stata. the commands i used are as foll…
Subscribe to:
Post Comments (Atom)
0 Response to Generate random numbers with specific mean and standard deviation within a range
Post a Comment