SAS Statistics by Example. Ron Cody, EdD. Читать онлайн. Newlib. NEWLIB.NET

Автор: Ron Cody, EdD
Издательство: Ingram
Серия:
Жанр произведения: Программы
Год издания: 0
isbn: 9781612900124
Скачать книгу
for subject 55.

      The box plot of the modified data set shows the two outliers as small circles:

Image610.png

      You can even get a bit fancier and let SAS label the outliers:

title “Demonstrating How Outliers are Displayed with a Box Plot”; proc sgplot data=Blood_Pressure_Out; hbox SBP / datalabel=Subj; run;

      The option DATALABEL= lets you select a variable to identify specific outliers. If you use the DATALABEL option without naming a label variable, SGPLOT uses the numerical value of the response variable (SBP in this example) to label the outliers. Here is the output:

Image625.png

      Notice that the outliers for subjects 5 and 55 are labeled.

      If you want to see a box plot for each value of a categorical variable, you can include the option CATEGORY= on the HBOX or VBOX statement. The example that follows uses the original Blood_Pressure data set (without the outliers) and displays a box plot for each value of Drug.

title “Box Plots of SBP for Each Value of Drug”; proc sgplot data=example.Blood_Pressure; hbox SBP / category=Drug; run;

      The HBOX option CATEGORY= generates a separate box plot for each of the three Drug values:

Image632.png

      Descriptive statistics should be your first step in data analysis so that you can see a summary of the data and better understand their distribution. This chapter showed you how to produce both numerical and graphical output for continuous variables, using a number of SAS procedures.

      The next two chapters will show you how to display descriptive statistics for categorical variables and how to investigate bivariate relationships.

      Chapter 3 Descriptive Statistics – Categorical Variables

       Introduction

       Computing Frequency Counts and Percentages

       Computing Frequencies on a Continuous Variable

       Using Formats to Group Observations

       Histograms and Bar charts

       Creating a Bar Chart Using PROC SGPLOT

      Конец ознакомительного фрагмента.

      Текст предоставлен ООО «ЛитРес».

      Прочитайте эту книгу целиком, купив полную легальную версию на ЛитРес.

      Безопасно оплатить книгу можно банковской картой Visa, MasterCard, Maestro, со счета мобильного телефона, с платежного терминала, в салоне МТС или Связной, через PayPal, WebMoney, Яндекс.Деньги, QIWI Кошелек, бонусными картами или другим удобным Вам способом.

/9j/4SMERXhpZgAATU0AKgAAAAgABwESAAMAAAABAAEAAAEaAAUAAAABAAAAYgEbAAUAAAABAAAA agEoAAMAAAABAAIAAAExAAIAAAAeAAAAcgEyAAIAAAAUAAAAkIdpAAQAAAABAAAApAAAANAALcbA AAAnEAAtxsAAACcQQWRvYmUgUGhvdG9zaG9wIENTNiAoV2luZG93cykAMjAxNDoxMTowNSAxMTo0 MjoyNAAAA6ABAAMAAAABAAEAAKACAAQAAAABAAAI7qADAAQAAAABAAALIgAAAAAAAAAGAQMAAwAA AAEABgAAARoABQAAAAEAAAEeARsABQAAAAEAAAEmASgAAwAAAAEAAgAAAgEABAAAAAEAAAEuAgIA BAA