In the 2017 Spanish Stata Users Group meeting, held in Madrid on October 19th, we introduced some functions for generating random samples from continuous and discrete distributions using STATA 13.
In this talk, we will show new extensions of such functions updated for STATA 15. We will describe their syntax and show different examples of use. In addition, we will compare the new developed functions with the build-in STATA ones and with the function rsample.
The goodness of the generated samples will be checked using the mean squared error (MSE) of the differences between the frequencies of the sample and the theoretical expected ones. We will also provide bar charts which will allow the user to compare graphically the sample with the exact distribution function of the random distribution which is being sampled.
Graphics capabilities are included in the new developed functions so that the distribution of the generated sample can be displayed. This fact is useful in the teaching and learning process in subjects which deals with Statistics. Specifically, this educational approach has been considered when teaching the subject “Statistics” in the Health Engineering degree of the University of Málaga (Spain).