The Stata command is:īar charts are frequently used to display nominal or ordinal data. For example, to compare total cholesterol levels between men (coded as 1) and women (coded as 0) click on the By option and select male to display the data by gender. Graphics > Box plotīox plots provide a five number summary of the dataīox plots are especially useful for comparing two or more plots. The median is lower than the mean indicating right skewness and the skewness is > 0, a positive number confirming data is slightly skewed toward the right. You can confirm this by running descriptive statistics. The histogram and the overlaid normal curve shows that the total cholesterol data is slightly right skewed. The option normal specifies that the histogram be overlaid with an appropriately scaled normal density curve. In the Command Window and press Enter to run the command. Since this is a continuous variable we can graph histogram or a box plot. Let’s graph the variable total cholesterol. Qualitative/Categorical data on the other hand are most frequently displayed using a bar chart and less frequently using a pie chart.Īll graphs can be accessed from Stata’s Graphics menu on top of the screen. Quantitative data can be displayed using histogram, box plot, or a scatter plot. The choice of the type of graph to use depends on the type of data available. To see the codesheet read my blogpost on Descriptive Statistics. I will use the Framingham dataset – framingam.dta – that can be downloaded HERE.
#Histogram stata how to#
In this blogpost I will demonstrate how to create five types of graphs in Stata: Histogram, Box plot, bar chart, and a pie chart.