![]() We can also use the round() command to round numbers. We can also create a stem-and-leaf plot for another variable in the dataset called price, which represents the price of each car in the dataset and takes on values in the thousands. For example, imagine the data set has five points, including 12, 15, 24, 34 and 36. Manually add in the leaves for each stem to complete the plot. Place the new column on the right side of the stems. Notice how each stem now has all of its values on one line. After setting up the stem column, do the same for the leaf column. You can specify that each stem only uses one line by using the lines() command: This produces the following stem-and-leaf plot for all of the values for mpg:īy default, Stata splits the stems into multiple lines. Type the following into the Command box and click Enter: Step 2: Create a stem-and-leaf plot for the variable mpg. Load this dataset by typing the following into the command box: We’ll use a built-in Stata dataset called auto for this example. Use the following steps to create a stem-and-leaf plot in Stata. Now let’s find out how to create a stem-and-leaf plot in Stata. ![]() The stem for each value is simply the first digit of the value while the leaf is the second digit of the value. Here is an example of a stem-and-leaf plot for a given dataset, created by the Statology Stem-and-Leaf Plot Generator: You should now be able to create a stem and leaf plot within SPSS.A stem-and-leaf plot is a chart we can use to display data by splitting up each value in a dataset into a stem and a leaf. Alternatively, check out our tutorial on exporting SPSS output to other applications such as Word, Excel, or PDF. If you want to save your stem and leaf plot, you can right-click on it within the Output Viewer in SPSS, and copy it to use in other programs. Since each leaf represents 1 case, we know that 7899 in the leaf column after the stem of 5 represents final exam scores of 57, 58, 59 and 59. In this example, the stem width of 10 means that the 5 in the stem column represents 50 (that is, 5 multiplied by 10), 6 represents 60 (6 multiplied by 10), and so on. Note that SPSS displays the “stem width” together with the number of cases that each leaf represents. The SPSS Output Viewer will pop up with the stem and leaf plot that you’ve created. Under “Display,” select “Plots” if you only want to generate a stem and leaf plot (without any accompanying statistics). Make sure that the “Stem-and-leaf” option is selected under “Descriptive.” Then select “None” under “Boxplots” and click the “Continue” button to return to the “Explore” dialog box below. This will bring up the “Explorer: Plots” dialog box illustrated below: Select the variable for which you wish to create a stem and leaf plot (“Statistics Final Exam Score” in this example), then use the arrow button to move it into the “Dependent List” box (as illustrated above). It is a good idea to click the “Reset” button to clear any previous settings. This brings up the “Explore” dialog box illustrated below: Select Analyze -> Descriptive Statistics -> Explore as illustrated below: Doing this will allow us to visualize the distribution of the scores while preserving information about the individual scores. We want to create a stem and leaf plot of these scores. This data set contains the hypothetical final exam scores of 40 students in a Statistics course (first 21 records displayed). (Check out our tutorials on importing data from Excel or MySQL into SPSS). Under “Boxplots” select “None” for “Boxplots”Īs usual with these quick tutorials, the starting assumption is that you have already imported data into SPSS, and you’re looking at something like the data set below.Ensure the “Stem-and-leaf” option is selected under “Descriptive”.Move the variable you wish to plot into the “Dependent List” box.Click Analyze -> Descriptive Statistics -> Explore.
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |