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
Running Two Limit Tobit modelHello, I have been attempting to run a Two Limit Tobit model on my data. I have a relatively large d…
Matching observations in a quasi-random processDear Statalisters, I want to create a set of observations which is used to test different models la…
Where to Specify Temporary Names for Local Macros Inside Ado FilesStata Listers: I have a general question about where to specify temporary names for local macros in…
Spatgsa - dimension of the matrix vs number of observationsDear Statalist members, I have an identical problem as the one previously published in the forum: h…
Reporting odds ratio for quantile regressionIn Stata 14 I can report odds ratios for OLS regression by adding Code: , eform(exp(Coef.)) But n…
Subscribe to:
Post Comments (Atom)
0 Response to Generate random numbers with specific mean and standard deviation within a range
Post a Comment