A Gentle Introduction to Statistics Using SAS Studio. Ron Cody

Читать онлайн книгу.

A Gentle Introduction to Statistics Using SAS Studio - Ron Cody


Скачать книгу
visualization software and SAS University Edition (or you are running SAS Studio with a standard version of SAS or SAS on Demand for Academics). Now, it’s time to get started. If you are using SAS University Edition, start your virtual computer by double-clicking on the appropriate icon on your desktop (the installation process should have placed this icon there). If you don’t see an icon for VirtualBox or one of the versions of VMware, you need to browse through your program list and create a shortcut on your desktop.

      For example, here is what you will see if you open VirtualBox:

      Figure 4.1: Opening VirtualBox

Figure 1.1 Some JMP Help Options

      Your screen might look a bit different. Double-click SAS University Edition. A window will pop up that looks like this:

      Figure 4.2: Opening SAS University Edition (VirtualBox)

Figure 1.1 Some JMP Help Options

      The URL in Figure 4.2 is

      http://localhost:10080

      Your URL might be different from this. Once you enter it into your browser, you will want to bookmark it so that you don’t have to type it every time you want to run the SAS University Edition. If you use a version of VMware, the URL will look something like an IP address such as

      http://192.168.117.129

      Regardless of which virtualization software you use, you will be directed to the SAS University Edition: Information Center screen. It looks like this:

      Figure 4.3: Opening Screen of SAS University Edition: Information Center

Figure 1.1 Some JMP Help Options

      If you see a message telling you that updates are available, you can click the Update icon or click the Start SAS Studio button and update at some other time. The Resources link is also very valuable—you can access help files, videos, books (even some of mine), and the always popular FAQs (frequently asked questions).

      To open SAS Studio, click “Start SAS Studio.”

      Figure 4.4: Opening Screen for SAS Studio

Figure 1.1 Some JMP Help Options

      As you can see in Figure 4.4, the rectangle on the left is called the navigation pane, and the larger rectangular area on the right is called the work area. The navigation pane, as the name implies, enables you to select tasks, browse files and folders, import data from a variety of sources such as Excel workbooks, and do other useful tasks that you will see a bit later.

      The work area consists of three sub-areas called CODE, LOG, and RESULTS. You can switch to any one of these areas by clicking on the appropriate tab. This is what you see if you are in SAS Programmer mode. You see different tabs when you are in Visual Programmer mode. We will stick to SAS Programmer Mode for all the examples in this book.

      The Code section is where you can write SAS programs (also the place where SAS Studio writes programs for you). The Log area displays information about data being read or written, syntax errors in your SAS code, and information about how much CPU time and total time were used to run your program. The Results area is where SAS Studio displays the tables, graphs, and statistics that you programmed yourself or had one of the built-in SAS Studio tasks produce for you.

      Figure 4.5 is an enlargement of the navigation pane.

      Figure 4.5: Enlarged View of the Navigation Pane

Figure 1.1 Some JMP Help Options

      When you click on any of the choices in the navigation pane, it expands and moves higher in the list. You can also expand or contract any of the sub-lists by clicking on the triangles to the left of the choices.

      Let’s start your exploration of SAS Studio by clicking the Libraries tab. Your Navigation pane will now look something like this:

      Figure 4.6: SAS Libraries

Figure 1.1 Some JMP Help Options

      Notice that the triangle to the left of the word My Libraries is now pointing downward, telling you that you are looking at sub-lists. Under My Libraries, you see a list of libraries. Libraries are places where SAS puts programs and data sets (think of folders on your hard drive). This author has already created a library called STATS, so you will not see that library on your computer until you run the Create_Datasets.sas program. However, SAS Studio comes with some libraries already installed. The WORK library is a temporary library—all data and programs placed there will be deleted when you exit SAS Studio.

      The SASHELP library, which comes with all SAS versions, contains over 200 data sets, covering a variety of topics such as car sales and health data. These data sets are quite useful because you can use them for examples or testing your code. Click the SASHELP library to see the list of built-in data sets. (See Figure 4.7 below.)

      Figure 4.7: Expanding the SASHELP Libraries

Figure 1.1 Some JMP Help Options

      Let’s scroll down to the HEART data set to demonstrate some of the features of SAS Studio. You can either double-click the Heart data set or highlight it or drag it to the work area. When you do this, SAS Studio displays the columns of the table and a listing of some of the top rows and columns of the actual table.

      Throughout this book and in the various SAS Studio tasks, the terms Columns and Variables, Rows and Observations, and data sets and tables are used interchangeably. Originally, SAS used the terms Variables, Observations, and data sets instead of the terminology that came along with many database programs (such as SQL) where the terms Columns, Rows, and tables are used instead.

      Having opened the Heart data set, your screen will look as follows:

      Figure 4.8: The HEART Data Set

Figure 1.1 Some JMP Help Options

      The Columns (variables) in the data set are displayed on the left (Figure 4.9).

      Figure 4.9: Columns in the HEART Data Set

Figure 1.1 Some JMP Help Options

      You can click Select all to toggle between selecting all the variables or none. You will see two easy ways to select columns in just a moment.

      The right side of the screen shows a portion of the actual table (Figure 4.10).

      Figure 4.10: Columns and Rows from the HEART Data Set

Figure 1.1 Some JMP Help Options

      You can use the horizontal and vertical scroll bars to examine additional columns and rows of this table (Figure 4.11).

      Figure 4.11: Horizontal and Vertical Scroll Bars

Figure 1.1 Some JMP Help Options

      As promised, you will now see how to select (or deselect) columns from a table. If you want to display just a few columns, it is best to click Select all, then deselect all of the columns. Then, to select the columns that you want, use one or both of these methods:

      ●


Скачать книгу