Generating random numbers for use in simulations
An important task during simulations is the construction of the random numbers to imitate changing input values. The discrete uniform distribution is useful for this purpose because it has the property that all events in a set N have the same probability of 1/N.
R scripts can generate random numbers from the uniform distribution by using the runif( n, [min = 0, max = 1 ] ) command, where,
- n is the quantity of random numbers to generate
- min is the lower limit of the distribution
- max is the upper limit of the distribution
http://hughesbennett.co.uk/RandomNumbersForSimulations