As the title says, I'm having a hard time creating a new variable that is comprised of a list of means pulled from random normal distributions. For example, I want variable(x) to have 1000 observations. Each observation is the mean value from a randomly generated normal distribution. Variable(x1) would be 1000 observations with the SD for each randomly generated normal distribution. So, observation 1 would be the mean and SD from a randomly generated normal distribution, observation 2 would be the mean and SD from another randomly generated normal distribution, and so on.
Using drawnorm I can generate an individual distribution and extract the distribution's mean and SD. I'm looking to automate the process so I don't have to run drawnorm 1,000 times and pull the mean/SD 1,000 times to generate the new variable.
I've tried a for loop to try and automate the process, but I am having a hard time getting anything to work. Any advice is very much appreciated!!
Hunter-
Using drawnorm I can generate an individual distribution and extract the distribution's mean and SD. I'm looking to automate the process so I don't have to run drawnorm 1,000 times and pull the mean/SD 1,000 times to generate the new variable.
I've tried a for loop to try and automate the process, but I am having a hard time getting anything to work. Any advice is very much appreciated!!
Hunter-
Comment