Exploratory Data Analysis with SAS Studio Jonathan W

Total Page:16

File Type:pdf, Size:1020Kb

Exploratory Data Analysis with SAS Studio Jonathan W SESUG Paper HOW-113-2017 SAS In The Classroom: Exploratory Data Analysis with SAS Studio Jonathan W. Duggins, NC State University, Raleigh, North Carolina Jim Blum, University of North Carolina Wilmington, Wilmington, North Carolina ABSTRACT SAS Studio®, and by extension SAS University Edition®, provide exciting opportunities for students early in their statistics education. By allowing students, and teachers, the ability to use a point-and-click, web- based interface students can calculate summary statistics, explore complex sampling distributions, and carry out inference procedures using an industry-standard analysis package but with minimal need for programming. We will discuss walking students through an activity intended to develop a graphics-based understanding of the sampling distribution for a mean. At the conclusion of the session participants will know: the difference between tasks and snippets; how to create graphical and numerical summaries of a data set, how to draw samples from a population; and how to use macro variables to customize the code generated by a process flow. INTRODUCTION SAS Studio provides access to SAS via a web browser that connects to a SAS server. Since that server can be a local copy of SAS installed on your PC, a local network SAS server, or a cloud-based SAS server this provides a flexible and convenient way to interact with SAS. SAS University Edition allows users to access SAS via a virtual application that includes a SAS server in the installation. Regardless of the location of the SAS server, once it processes the user-submitted code the results are displayed via your web browser using the SAS Studio interface. As such, the term SAS Studio is used exclusively for the rest of this paper with the understanding that the end-user must select the best implementation for their classroom setting. Regardless of implantation, SAS Studio provides an opportunity to introduce more high school students to statistical software to help them develop a deeper understanding of data analysis and help high school teachers implement portions of the newest Guidelines for Assessment and Instruction in Statistics Education (GAISE) Report. With the ability to provide drag-and-drop and point-and-click interfaces students can quickly begin exploring data using an intuitive interface. Attendees learn how to use SAS Studio to select random samples, explore data graphically, and generate a sampling distribution by creating a custom snippet. SAS STUDIO BASICS When opening SAS Studio users will notice the navigation pane, shown in Figure 1, on the left of the screen that provides access to files, libraries, and other useful resources such as tasks and snippets. Figure 1. SAS Studio home screen. Navigation pane (left) and workflow pane (right). The Files and Folders menu and Libraries menu allow navigation to access files and data sets for use during the current SAS session. The Tasks and Utilities menu gives users access to a wide variety of common programming elements (e.g. random sampling or data transposition) that allow output to be 1 generated via a point-and-click interface. Snippets are smaller programs designed to be inserted into the user’s workflow. Unlike tasks, snippets are not editable via a point-and-click or menu-driven interface; instead their lines of code need to be edited manually. However, once edited the user has the option of saving the updated code as a custom snippet that will appear in the Snippets menu. Users should also note they have the option to select the Visual Programmer or SAS Programmer perspective via a dropdown menu shown near the top right corner of the current session. (Top right, Figure 1.) The SAS programmer perspective allows users to create original programs from scratch or edit previously created programs. This perspective would be familiar to programmers with experience using SAS via the Interactive Windowing Environment but with the code, log, and results viewer windows now represented as tabs within the same web page. However, users are now able to add code to a program via a snippet by simply dragging it from the snippet menu into their program editor. When using the visual programmer perspective users will be able to build a process flow in the workspace pane, shown on right side of Figure 1. Process flows are built when the user drags an object, such as a task or snippet, from the navigation pane into the workspace. Each object creates a node that can be connected to other nodes; these connections then create the process flow. Participants will be walked through creating a process flow. SCENARIO AND DATA SET The National Center for Missing and Exploited Children (NCMEC) provides publicly available data that includes several variables related to open cases of missing children. The data set used here is from March, 2017. This data was made public as part of the Cloudera Child Finder Hackathon to prompt the development of new techniques for finding missing children. In this workshop participants will be guided through using SAS Studio to explore the data and use it to demonstrate some statistical principles appropriate for an AP Statistics course. CREATING THE PROCESS FLOW READING THE DATA Participants have been provided with the NCMEC data and there are several methods for making it available for use. The most flexible is to create a new library to contain the input data and hold any output data sets that are created. To add a library, first go to the navigation pane and click on the Libraries menu. Next, click on the file drawer icon (indicated by the red circle in Figure 2) to bring up the New Library dialog box. Figure 2. New Library dialog box. 2 In the dialog box include the information shown below to provide your library with a name and the physical location where your NCMEC data set is located. Once the information has been provided, click OK to add the library, which the author named SESUG, to the list of libraries shown in the Navigation Pane. Clicking on the newly added library will show the icon for the NCMEC data set. TASKS Now that the data has been made available participants can begin constructing the process flow. The first five nodes included in the solution to this activity come from the Tasks and Utilities menu. The first task is the histogram which is found by going to Tasks and Utilities Tasks Graphs Histogram. Dragging the histogram task from this menu into the workspace adds the histogram as a node in the process flow as shown in Figure 3. Figure 3. Histogram task as a process flow node The red triangle in the circle located in the lower right corner of the node indicates it is not completed and still requires user input. Three smaller boxes on the edges of the node – two on the left and one on the right – appear as well. The lower left-hand box has a grayed out data set icon indicating that no data set has been assigned to the node yet. The remaining boxes are control ports. Control ports are used to indicate the order in which nodes should be included in the process flow. With only a single node in the process flow these ports are not needed yet. To access the histogram node, double-click it (or right-click and select Open from the menu) and the workspace pane will be further split: on the left are the settings for this node and on the right is where SAS will display the code and results generated based on the user’s choices in the settings. Figure 4 shows the panes from the author’s SAS Studio session. Figure 4. Histogram task with Settings (left) and Code/Results (right) displayed. 3 Users can select to see only the Settings or Code/Results pane by selecting the appropriate button at the top left of the session; Split is chosen by default to allow users to see both panes. The top of the settings pane includes four tabs: Data, Options, Information, and Node. The Data tab is selected with two settings expanded by default: Data and Roles. The Code/Results pane initially contains three tabs: Code, Log, and Results; the Code tab is active by default. Looking again at the Data tab users will also notice the red exclamation point indicating that SAS can’t generate a histogram yet. The histogram task requires both a data set and an analysis variable be selected. The Code tab indicates that no code could be generated as a result; users will need to specify a data set and an analysis variable to proceed. Under the Data setting the drop-down allows the selection of a recently-used data set and the icon to the right of the drop-down opens a dialog box where a user can navigate to any desired data set. SAS Studio will populate this field automatically with a recently used data set so it is important to ensure the correct data set is selected for each node in the process flow. Attendees should use the NCMEC data set in the SESUG library added above to begin the process flow. Figure 5. Histogram task showing Data tab selections and resulting code. Users can now select a single response variable for the histogram via the plus sign next to Analysis variable under the Roles setting. This displays a list of the numeric variables available in the data set from the Data setting. (If the wrong variable is chosen the trashcan icon can be used to remove it.) Expanding the Density Curves setting shows two check boxes that can be used to request normal and kernel density estimates be overlain on the histogram.
Recommended publications
  • Lesson 3: Sampling Plan 1. Introduction to Quantitative Sampling Sampling: Definition
    Quantitative approaches Quantitative approaches Plan Lesson 3: Sampling 1. Introduction to quantitative sampling 2. Sampling error and sampling bias 3. Response rate 4. Types of "probability samples" 5. The size of the sample 6. Types of "non-probability samples" 1 2 Quantitative approaches Quantitative approaches 1. Introduction to quantitative sampling Sampling: Definition Sampling = choosing the unities (e.g. individuals, famililies, countries, texts, activities) to be investigated 3 4 Quantitative approaches Quantitative approaches Sampling: quantitative and qualitative Population and Sample "First, the term "sampling" is problematic for qualitative research, because it implies the purpose of "representing" the population sampled. Population Quantitative methods texts typically recognize only two main types of sampling: probability sampling (such as random sampling) and Sample convenience sampling." (...) any nonprobability sampling strategy is seen as "convenience sampling" and is strongly discouraged." IIIIIIIIIIIIIIII Sampling This view ignores the fact that, in qualitative research, the typical way of IIIIIIIIIIIIIIII IIIII selecting settings and individuals is neither probability sampling nor IIIII convenience sampling." IIIIIIIIIIIIIIII IIIIIIIIIIIIIIII It falls into a third category, which I will call purposeful selection; other (= «!Miniature population!») terms are purposeful sampling and criterion-based selection." IIIIIIIIIIIIIIII This is a strategy in which particular settings, persons, or activieties are selected deliberately in order to provide information that can't be gotten as well from other choices." Maxwell , Joseph A. , Qualitative research design..., 2005 , 88 5 6 Quantitative approaches Quantitative approaches Population, Sample, Sampling frame Representative sample, probability sample Population = ensemble of unities from which the sample is Representative sample = Sample that reflects the population taken in a reliable way: the sample is a «!miniature population!» Sample = part of the population that is chosen for investigation.
    [Show full text]
  • Chapter 3: Simple Random Sampling and Systematic Sampling
    Chapter 3: Simple Random Sampling and Systematic Sampling Simple random sampling and systematic sampling provide the foundation for almost all of the more complex sampling designs that are based on probability sampling. They are also usually the easiest designs to implement. These two designs highlight a trade-off inherent in all sampling designs: do we select sample units at random to minimize the risk of introducing biases into the sample or do we select sample units systematically to ensure that sample units are well- distributed throughout the population? Both designs involve selecting n sample units from the N units in the population and can be implemented with or without replacement. Simple Random Sampling When the population of interest is relatively homogeneous then simple random sampling works well, which means it provides estimates that are unbiased and have high precision. When little is known about a population in advance, such as in a pilot study, simple random sampling is a common design choice. Advantages: • Easy to implement • Requires little advance knowledge about the target population Disadvantages: • Imprecise relative to other designs if the population is heterogeneous • More expensive to implement than other designs if entities are clumped and the cost to travel among units is appreciable How it is implemented: • Select n sample units at random from N available in the population All units within the population must have the same probability of being selected, therefore each and every sample of size n drawn from the population has an equal chance of being selected. There are many strategies available for selecting a random sample.
    [Show full text]
  • R(Y NONRESPONSE in SURVEY RESEARCH Proceedings of the Eighth International Workshop on Household Survey Nonresponse 24-26 September 1997
    ZUMA Zentrum für Umfragen, Melhoden und Analysen No. 4 r(y NONRESPONSE IN SURVEY RESEARCH Proceedings of the Eighth International Workshop on Household Survey Nonresponse 24-26 September 1997 Edited by Achim Koch and Rolf Porst Copyright O 1998 by ZUMA, Mannheini, Gerinany All rights reserved. No part of tliis book rnay be reproduced or utilized in any form or by aiiy means, electronic or mechanical, including photocopying, recording, or by any inforniation Storage and retrieval System, without permission in writing froni the publisher. Editors: Achim Koch and Rolf Porst Publisher: Zentrum für Umfragen, Methoden und Analysen (ZUMA) ZUMA is a member of the Gesellschaft Sozialwissenschaftlicher Infrastruktureinrichtungen e.V. (GESIS) ZUMA Board Chair: Prof. Dr. Max Kaase Dii-ector: Prof. Dr. Peter Ph. Mohlcr P.O. Box 12 21 55 D - 68072.-Mannheim Germany Phone: +49-62 1- 1246-0 Fax: +49-62 1- 1246- 100 Internet: http://www.social-science-gesis.de/ Printed by Druck & Kopie hanel, Mannheim ISBN 3-924220-15-8 Contents Preface and Acknowledgements Current Issues in Household Survey Nonresponse at Statistics Canada Larry Swin und David Dolson Assessment of Efforts to Reduce Nonresponse Bias: 1996 Survey of Income and Program Participation (SIPP) Preston. Jay Waite, Vicki J. Huggi~isund Stephen 1'. Mnck Tlie Impact of Nonresponse on the Unemployment Rate in the Current Population Survey (CPS) Ciyde Tucker arzd Brian A. Harris-Kojetin An Evaluation of Unit Nonresponse Bias in the Italian Households Budget Survey Claudio Ceccarelli, Giuliana Coccia and Fahio Crescetzzi Nonresponse in the 1996 Income Survey (Supplement to the Microcensus) Eva Huvasi anci Acfhnz Marron The Stability ol' Nonresponse Rates According to Socio-Dernographic Categories Metku Znletel anci Vasju Vehovar Understanding Household Survey Nonresponse Through Geo-demographic Coding Schemes Jolin King Response Distributions when TDE is lntroduced Hikan L.
    [Show full text]
  • Lecture 8: Sampling Methods
    Lecture 8: Sampling Methods Donglei Du ([email protected]) Faculty of Business Administration, University of New Brunswick, NB Canada Fredericton E3B 9Y2 Donglei Du (UNB) ADM 2623: Business Statistics 1 / 30 Table of contents 1 Sampling Methods Why Sampling Probability vs non-probability sampling methods Sampling with replacement vs without replacement Random Sampling Methods 2 Simple random sampling with and without replacement Simple random sampling without replacement Simple random sampling with replacement 3 Sampling error vs non-sampling error 4 Sampling distribution of sample statistic Histogram of the sample mean under SRR 5 Distribution of the sample mean under SRR: The central limit theorem Donglei Du (UNB) ADM 2623: Business Statistics 2 / 30 Layout 1 Sampling Methods Why Sampling Probability vs non-probability sampling methods Sampling with replacement vs without replacement Random Sampling Methods 2 Simple random sampling with and without replacement Simple random sampling without replacement Simple random sampling with replacement 3 Sampling error vs non-sampling error 4 Sampling distribution of sample statistic Histogram of the sample mean under SRR 5 Distribution of the sample mean under SRR: The central limit theorem Donglei Du (UNB) ADM 2623: Business Statistics 3 / 30 Why sampling? The physical impossibility of checking all items in the population, and, also, it would be too time-consuming The studying of all the items in a population would not be cost effective The sample results are usually adequate The destructive nature of certain tests Donglei Du (UNB) ADM 2623: Business Statistics 4 / 30 Sampling Methods Probability Sampling: Each data unit in the population has a known likelihood of being included in the sample.
    [Show full text]
  • Survey Design
    1 Survey Design Target population: The scope of ACES is to capture investment by all domestic, private, non-farm businesses, including agricultural non-farm business and businesses without employees. Investment made after applying for an Employer Identification Number (EIN) from the Internal Revenue Service (IRS) but before having any payroll or receipts is also included. Major exclusions are foreign operations of U.S. businesses, businesses in the U.S. territories, government operations (including the U.S. Postal Service), agricultural production companies and private households. Sampling frame: ACES collects information at the company level. The records of how the company invests are maintained at the headquarters level, and not at the location of each physical operating location. Companies may elect to have divisions within the company report, but the sampling unit and tabulation unit will be the company. A company’s importance to the survey depends on their employment, payroll, and their business activity. The greater the number of employees or the larger the payroll, the more likely, in general, a company is to be selected in the sample. The influence that the amount of payroll has on the likelihood of selection is adjusted by the business activity such that two companies with similar payroll but in different business activities will not have the same likelihood of selection. This is done to improve the quality of the estimates from any particular ACES specific industry code for business activities. Estimates are from two distinct samples from distinct frames. The first frame collects in-scope companies with employees. Companies sampled from this frame will receive an ACE-1 form, and the frame and sample are the ACE-1 frame and sample, respectively.
    [Show full text]
  • STANDARDS and GUIDELINES for STATISTICAL SURVEYS September 2006
    OFFICE OF MANAGEMENT AND BUDGET STANDARDS AND GUIDELINES FOR STATISTICAL SURVEYS September 2006 Table of Contents LIST OF STANDARDS FOR STATISTICAL SURVEYS ....................................................... i INTRODUCTION......................................................................................................................... 1 SECTION 1 DEVELOPMENT OF CONCEPTS, METHODS, AND DESIGN .................. 5 Section 1.1 Survey Planning..................................................................................................... 5 Section 1.2 Survey Design........................................................................................................ 7 Section 1.3 Survey Response Rates.......................................................................................... 8 Section 1.4 Pretesting Survey Systems..................................................................................... 9 SECTION 2 COLLECTION OF DATA................................................................................... 9 Section 2.1 Developing Sampling Frames................................................................................ 9 Section 2.2 Required Notifications to Potential Survey Respondents.................................... 10 Section 2.3 Data Collection Methodology.............................................................................. 11 SECTION 3 PROCESSING AND EDITING OF DATA...................................................... 13 Section 3.1 Data Editing ........................................................................................................
    [Show full text]
  • Unit 16: Census and Sampling
    Unit 16: Census and Sampling Summary of Video There are some questions for which an experiment can’t help us find the answer. For example, suppose we wanted to know what percentage of Americans smoke cigarettes, or what per- centage of supermarket chicken is contaminated with salmonella bacteria. There is no experi- ment that can be done to answer these types of questions. We could test every chicken on the market, or ask every person if they smoke. This is a census, a count of each and every item in a population. It seems like a census would be a straightforward way to get the most accurate, thorough information. But taking an accurate census is more difficult than you might think. The U.S. Constitution requires a census of the U.S population every ten years. In 2010, more than 308 million Americans were counted. However, the Census Bureau knows that some people are not included in this count. Undercounting certain segments of the population is a problem that can affect the representation given to a certain region as well as the federal funds it receives. What is particularly problematic is that not all groups are undercounted at the same rate. For example, the 2010 census had a hard time trying to reach renters. The first step in the U.S. Census is mailing a questionnaire to every household in the country. In 2010 about three quarters of the questionnaires were returned before the deadline. A census taker visits those households that do not respond by mail, but still not everyone is reached.
    [Show full text]
  • Second Stage Sampling for Conflict Areas: Methods and Implications Kristen Himelein, Stephanie Eckman, Siobhan Murray and Johannes Bauer 1
    Second Stage Sampling for Conflict Areas: Methods and Implications Kristen Himelein, Stephanie Eckman, Siobhan Murray and Johannes Bauer 1 Abstract: The collection of survey data from war zones or other unstable security situations is vulnerable to error because conflict often limits the options for implementation. Although there are elevated risks throughout the process, we focus here on challenges to frame construction and sample selection. We explore several alternative sampling approaches considered for the second stage selection of households for a survey in Mogadishu, Somalia. The methods are evaluated on precision, the complexity of calculations, the amount of time necessary for preparatory office work and the field implementation, and ease of implementation and verification. Unpublished manuscript prepared for the Annual Bank Conference on Africa on June 8 – 9, 2015 in Berkeley, California. Do not cite without authors’ permission. Acknowledgments: The authors would like to thank Utz Pape, from the World Bank, and Matthieu Dillais from Altai Consulting for their comments on this draft, and Hannah Mautner and Ruben Bach of IAB for their research assistance. 1 Kristen Himelein is a senior economist / statistician in the Poverty Global Practice at the World Bank. Stephanie Eckman is a senior researcher at the Institute for Employment Research (IAB) in Nuremberg, Germany. Siobhan Murray is a technical specialist in the Development Economics Research Group in the World Bank. Johannes Bauer is research fellow at the Institute for Sociology, Ludwigs-Maximilians University Munich and at the Institute for Employment Research (IAB). All views are those of the authors and do not reflect the views of their employers including the World Bank or its member countries.
    [Show full text]
  • Ch7 Sampling Techniques
    7 - 1 Chapter 7. Sampling Techniques Introduction to Sampling Distinguishing Between a Sample and a Population Simple Random Sampling Step 1. Defining the Population Step 2. Constructing a List Step 3. Drawing the Sample Step 4. Contacting Members of the Sample Stratified Random Sampling Convenience Sampling Quota Sampling Thinking Critically About Everyday Information Sample Size Sampling Error Evaluating Information From Samples Case Analysis General Summary Detailed Summary Key Terms Review Questions/Exercises 7 - 2 Introduction to Sampling The way in which we select a sample of individuals to be research participants is critical. How we select participants (random sampling) will determine the population to which we may generalize our research findings. The procedure that we use for assigning participants to different treatment conditions (random assignment) will determine whether bias exists in our treatment groups (Are the groups equal on all known and unknown factors?). We address random sampling in this chapter; we will address random assignment later in the book. If we do a poor job at the sampling stage of the research process, the integrity of the entire project is at risk. If we are interested in the effect of TV violence on children, which children are we going to observe? Where do they come from? How many? How will they be selected? These are important questions. Each of the sampling techniques described in this chapter has advantages and disadvantages. Distinguishing Between a Sample and a Population Before describing sampling procedures, we need to define a few key terms. The term population means all members that meet a set of specifications or a specified criterion.
    [Show full text]
  • METHOD GUIDE 3 Survey Sampling and Administration
    METHOD GUIDE 3 Survey sampling and administration Alexandre Barbosa, Marcelo Pitta, Fabio Senne and Maria Eugênia Sózio Regional Center for Studies on the Development of the Information Society (Cetic.br), Brazil November 2016 1 Table of Contents Global Kids Online ......................................................................................................................... 3 Abstract .......................................................................................................................................... 4 Key issues ...................................................................................................................................... 5 Main approaches and identifying good practice ......................................................................... 7 Survey frame and sources of information .................................................................................................................... 8 Methods of data collection ................................................................................................................................................ 8 Choosing an appropriate method of data collection.......................................................................................................... 9 Sampling plan.................................................................................................................................................................. 11 Target population .......................................................................................................................................................
    [Show full text]
  • Sample Surveys Test Review SOLUTIONS/EXPLANATIONS – Multiple Choice Questions
    Sample Surveys Test Review SOLUTIONS/EXPLANATIONS – Multiple Choice questions Correct answers are bolded. Explanations are in red. 1. Ann Landers, who wrote a daily advice column appearing in newspapers across the country, once asked her readers, “If you had to do it all over again, would you have children?” Of the more than 10,000 readers who responded, 70% said no. What does this show? (A) The survey is meaningless because of voluntary response bias. Explanation: Voluntary response bias is powerful – it means only people with strong opinions about the topic will respond. It will always give meaningless information for that reason, no matter what the “characteristics of her readers” include. (B) No meaningful conclusion is possible without knowing something more about the characteristics of her readers. (See above) (C) The survey would have been more meaningful if she had picked a random sample of the 10,000 readers who responded. This is nonsense. If she picks a random sample of the 10,000 people, these are the people who voluntarily responded. It then becomes a biased random sample and is still meaningless. (D) The survey would have been more meaningful if she had used a control group. Also nonsense. How do you have a control group with a voluntary survey? “Hey, you, please DON’T take this survey.” (E) This was a legitimate sample, randomly drawn from her readers and of sufficient size to allow the conclusion that most of her readers who are parents would have second thoughts about having children. NOT random, hello. 2. Which of the following are true statements? I.
    [Show full text]
  • Interactive Lecture Notes 03-Sampling, Surveys and Gathering Useful Data
    Author: Brenda Gunderson, Ph.D., 2015 License: Unless otherwise noted, this material is made available under the terms of the Creative Commons Attribution- NonCommercial-Share Alike 3.0 Unported License: http://creativecommons.org/licenses/by-nc-sa/3.0/ The University of Michigan Open.Michigan initiative has reviewed this material in accordance with U.S. Copyright Law and have tried to maximize your ability to use, share, and adapt it. The attribution key provides information about how you may share and adapt this material. Copyright holders of content included in this material should contact [email protected] with any questions, corrections, or clarification regarding the use of content. For more information about how to attribute these materials visit: http://open.umich.edu/education/about/terms-of-use. Some materials are used with permission from the copyright holders. You may need to obtain new permission to use those materials for other uses. This includes all content from: Attribution Key For more information see: http:://open.umich.edu/wiki/AttributionPolicy Content the copyright holder, author, or law permits you to use, share and adapt: Creative Commons Attribution-NonCommercial-Share Alike License Public Domain – Self Dedicated: Works that a copyright holder has dedicated to the public domain. Make Your Own Assessment Content Open.Michigan believes can be used, shared, and adapted because it is ineligible for copyright. Public Domain – Ineligible. Works that are ineligible for copyright protection in the U.S. (17 USC §102(b)) *laws in your jurisdiction may differ. Content Open.Michigan has used under a Fair Use determination Fair Use: Use of works that is determined to be Fair consistent with the U.S.
    [Show full text]