DSCI 325: Handout 3 Creating and Redefining Variable in SAS Spring 2017

Size: px
Start display at page:

Download "DSCI 325: Handout 3 Creating and Redefining Variable in SAS Spring 2017"

Transcription

1 DSCI 325: Handout 3 Creating and Redefining Variable in SAS Spring 2017 Content Source: The Little SAS Book, Chapter 3, by L. Delwiche and S. Slaughter. CREATING NEW VARIABLES OR REDEFINING VARIABLES In SAS, you can create new variables using an assignment statement with this general form: variable = expression; You name the variable on the left-hand side of the equal sign and tell SAS what value you want this variable to assume on the right-hand side. If this is a new variable, SAS will add it to your data set; if the variable already exists, SAS replaces the old value with the new. For example, consider the following statements. DATA test; INPUT y; Value = 1; Value2 = '1'; Value3 = y + 1; DATALINES; ; PROC PRINT; PROC CONTENTS; SAS returns the following: From PROC PRINT From PROC CONTENTS 1

2 For a more realistic example, consider the NYC_Trees data set. If you haven t already done so, create your own local library. Then, use the Import Wizard to place the NYC_Trees data set in your local library. The following PROC IMPORT code did this for me. PROC IMPORT OUT= Hooks.NYC_Trees DATAFILE= '/folders/myfolders/nyc_trees.csv' DBMS=CSV REPLACE; GETNAMES=YES; DATAROW=2; A print-out of the first few rows of this data set is given below. The variables Diameter, Height, and CanopyArea are all expressed using the metric system (i.e., they are measured in cm, m, and m 2, respectively). Suppose your goal is to convert these measurements into the standard measurement system used in the U.S. Before we write the SAS code to convert these measurements, let s compute the diameter in inches, the height in feet, and the canopy area in ft 2 for the first observation. Diameter (inches): = Height (feet): = Canopy Area (ft 2 ): = The following code can be used to convert the measurement units of these variables. DATA NYC_Trees2; SET Hooks.NYC_Trees; Diameter = *Diameter; Height = *Height; CanopyArea = *CanopyArea; PROC PRINT DATA=NYC_Trees2; 2

3 A portion of the SAS print-out of the converted variables is shown below. Note that SAS replaced the values of the original variables Diameter, Height, and CanopyArea. Suppose you wanted to instead keep the original diameter measurements in metric units and to simply add a new variable, say DiameterInch, to the dataset for the converted values. Consider the following code. DATA NYC_Trees2; SET Hooks.NYC_Trees; Diameter = *Diameter; DiameterInch = *Diameter; PROC PRINT data=nyc_trees2; VAR Native Condition Diameter DiameterInch; Note: The VAR statement in the PROC PRINT tells SAS to print only the variable(s) listed. Question: Note that the values for DiameterInch are NOT correct; the value for the first observation should be Why did this happen? 2. How would you fix this? 3

4 USING SAS FUNCTIONS SAS has the ability to do much more than simple arithmetic in its DATA step. There are many SAS functions available (e.g., string functions, mathematical functions, date functions, probability functions, etc.) that can be used to manipulate data and create new variables. The general form of a function is as follows: function_name(argument1, argument2, ) To introduce some commonly used SAS functions, we will consider the Grades.csv data set. Use PROC IMPORT to read in this data set and store it in your own library (recall that you can select PROC IMPORT code from the Snippets tab). First, we will discuss the SUM function which can be used to add up quiz scores. Consider the following programming statements: DATA Grades2; SET Hooks.Grades; TotalQuiz = SUM(Quiz1,Quiz2,Quiz3,Quiz4,Quiz5,Quiz6,Quiz7,Quiz8,Quiz9,Quiz10,Quiz11,Quiz12); PROC PRINT; Note that this program creates a new data set named Grades2. The SET command within the DATA step tells SAS that you want to work with an existing data set (specifically, the Grades data set which is located in the Hooks library). The Grades2 data set will be stored in the temporary WORK library. The Grades2 data set will contain ALL information (i.e., all variables and all observations) from Hooks.Grades in addition to any new variables that are created in this DATA step (e.g., TotalQuiz). A portion of the Grades2 dataset containing the new variable TotalQuiz is shown below. 4

5 Next, consider the task of finding a final percentage grade for each student. Assume final percentage grades are determined using the following formula: Points Earned / Points Possible, where Points Earned = (Quiz Total Lowest Quiz) + (Exam Total 0.5*Lowest Exam) + Final + EC Points Possible = 570 Tasks: 1. In the table below, write the additional statements necessary to compute the final percentage grade. Name this variable FinalPercent. Use as many lines as necessary. DATA Grades2; SET Hooks.Grades; TotalQuiz = SUM(Quiz1,Quiz2,Quiz3,Quiz4,Quiz5,Quiz6,Quiz7,Quiz8,Quiz9,Quiz10,Quiz11,Quiz12); 2. Type your code into your SAS program and make sure it works. Use the following SAS code to print out these variables to verify your answer (the values for the first four observations are shown below). PROC PRINT data=grades2; VAR FIRSTNAME LASTNAME FinalPercent; 5

6 3. Add the following statement to your DATA step: LastMonth = MONTH(LastDay); What does the MONTH function do? How is this value stored? 4. Create a new variable called Name which concatenates the students first and last names (search the web or use SAS Help to learn how to concatenate strings in SAS). Write the SAS code used to do this below, and verify that it works. DATA Grades2; SET Hooks.Grades; 6

7 Next, we will discuss a few character functions available in SAS that are useful for working with string data. LENGTH(arg) returns the length of an argument (not counting trailing blanks) SUBSTR(arg, p, n) extracts a substring from an argument arg starting at position p for n characters (or until the end if no n is specified). FIND(string, substring, optional modifiers, optional start position) locates a substring within a string for character variables. This function also allows for some modifiers such as i' to ignore case and t to ignore trailing blanks (see the example below). It also allows you to specify the position at which the search should start (by default, it starts at the beginning of the string). Consider the following statements: DATA test; STRING1 = 'Tisha tisha Hooks'; STRING2 = 'tisha'; TEST1 = LENGTH(STRING1); TEST2 = LENGTH(STRING2 ' ' 'hooks'); TEST3 = SUBSTR(STRING1,13,4); TEST4 = FIND(STRING1,STRING2); TEST5 = FIND(STRING1,STRING2, 'i'); TEST6 = FIND(STRING2, a ); PROC PRINT; Fill in the output window below with appropriate values, and then run the program in SAS to check your answers. 7

8 Tasks: Use the Grades data set for the following. 1. Use the SUBSTR character function to create a new variable called ZipCode. The zip code for each observation is the first 5 characters of the existing ZipTownAreaCode variable. 2. Create a new variable called Town that contains the Town name. Be careful to not include any unnecessary spaces (you can check the length of your new variable with the LENGTH function). Here is my output: 3. Note that you could use the FIND function to find the location of the character ( in the ZipTownAreaCode variable. Look up information on the INDEX function and find the location of this character using INDEX, instead. What advantage(s) does the FIND function have over the INDEX function? 4. Look up information on the ZIPCITYDISTANCE function in SAS and use it to compute the distance between the zip code for each student and (Winona s zip code). What does the value SAS returns represent? Your output should match the following: 8

9 Tasks: Consider the data in the ContactInfo.csv file. 1. Read this data file into SAS. Be sure to check that the data is read in properly for all observations! 2. Create a new variable named DomainName that contains only the domain names from each address (e.g., verizon.net). Write your SAS program used to do this below: 3. Note that once you have created this new variable, you can use the following code to calculate the total counts and percentage of observations that fall under each domain name. PROC FREQ; TABLE DomainName; A portion of the output is shown below. What is the problem? Find a SAS function that can be used to fix this problem. 9

10 This handout has introduced a few functions that are available in SAS. For more information, see the following resources from support.sas.com: More information on Character Functions: More information on SAS Functions: r.htm#p0w6napahk6x0an0z2dzozh2ouzm.htm 10

DSCI 325: Handout 4 If-Then Statements in SAS Spring 2017

DSCI 325: Handout 4 If-Then Statements in SAS Spring 2017 DSCI 325: Handout 4 If-Then Statements in SAS Spring 2017 IF-THEN STATEMENTS IN SAS We have already worked briefly with IF-THEN statements in SAS. Here, we will discuss using IF-THEN statements in a DATA

More information

DSCI 325: Handout 6 More on Manipulating Data in SAS Spring 2017

DSCI 325: Handout 6 More on Manipulating Data in SAS Spring 2017 DSCI 325: Handout 6 More on Manipulating Data in SAS Spring 2017 CREATING VARIABLES IN SAS: A WRAP-UP As you have already seen several times, SAS variables can be created with an assignment statement in

More information

DSCI 325: Handout 2 Getting Data into SAS Spring 2017

DSCI 325: Handout 2 Getting Data into SAS Spring 2017 DSCI 325: Handout 2 Getting Data into SAS Spring 2017 Data sets come in many different formats. In some situations, data sets are stored on paper (e.g., surveys) and other times data are stored in huge

More information

DSCI 325: Handout 9 Sorting and Options for Printing Data in SAS Spring 2017

DSCI 325: Handout 9 Sorting and Options for Printing Data in SAS Spring 2017 DSCI 325: Handout 9 Sorting and Options for Printing Data in SAS Spring 2017 There are a handful of statements (TITLE, FOOTNOTE, WHERE, BY, etc.) that can be used in a wide variety of procedures. For example,

More information

DSCI 325: Handout 10 Summarizing Numerical and Categorical Data in SAS Spring 2017

DSCI 325: Handout 10 Summarizing Numerical and Categorical Data in SAS Spring 2017 DSCI 325: Handout 10 Summarizing Numerical and Categorical Data in SAS Spring 2017 USING PROC MEANS The routine PROC MEANS can be used to obtain limited summaries for numerical variables (e.g., the mean,

More information

STAT:5400 Computing in Statistics

STAT:5400 Computing in Statistics STAT:5400 Computing in Statistics Introduction to SAS Lecture 18 Oct 12, 2015 Kate Cowles 374 SH, 335-0727 kate-cowles@uiowaedu SAS SAS is the statistical software package most commonly used in business,

More information

Introduction to SPSS on the Macintosh. Scott Patterson,Ph.D. Broadcast and Electronic Communication Arts San Francisco State University.

Introduction to SPSS on the Macintosh. Scott Patterson,Ph.D. Broadcast and Electronic Communication Arts San Francisco State University. Introduction to SPSS on the Macintosh. Scott Patterson,Ph.D. Broadcast and Electronic Communication Arts San Francisco State University Spring 2000 This is a brief guide to using SPSS in the Macintosh

More information

Lab #3: Probability, Simulations, Distributions:

Lab #3: Probability, Simulations, Distributions: Lab #3: Probability, Simulations, Distributions: A. Objectives: 1. Reading from an external file 2. Create contingency table 3. Simulate a probability distribution 4. The Uniform Distribution Reading from

More information

GRADEBOOK. Create Columns. Note: The My Grades tool needs to be added to your course before your students can see their grades

GRADEBOOK. Create Columns. Note: The My Grades tool needs to be added to your course before your students can see their grades LEARNING BLACKBOARD VISTA 4.0 1 Note: The My Grades tool needs to be added to your course before your students can see their grades To add the My Grades tool for your students, select the Build Tab>Manage

More information

Access - Introduction to Queries

Access - Introduction to Queries Access - Introduction to Queries Part of managing a database involves asking questions about the data. A query is an Access object that you can use to ask the question(s). The answer is contained in the

More information

Introduction to DATA Step Programming SAS Basics II. Susan J. Slaughter, Avocet Solutions

Introduction to DATA Step Programming SAS Basics II. Susan J. Slaughter, Avocet Solutions Introduction to DATA Step Programming SAS Basics II Susan J. Slaughter, Avocet Solutions SAS Essentials Section for people new to SAS Core presentations 1. How SAS Thinks 2. Introduction to DATA Step Programming

More information

proc print data=account; <insert statement here> run;

proc print data=account; <insert statement here> run; Statistics 6250 Name: Fall 2012 (print: first last ) Prof. Fan NetID #: Midterm Three Instructions: This is an in-class and open book midterm. You must write your answers on the provide spaces. Give concise

More information

Introduction to DATA Step Programming: SAS Basics II. Susan J. Slaughter, Avocet Solutions

Introduction to DATA Step Programming: SAS Basics II. Susan J. Slaughter, Avocet Solutions Introduction to DATA Step Programming: SAS Basics II Susan J. Slaughter, Avocet Solutions SAS Essentials Section for people new to SAS Core presentations 1. How SAS Thinks 2. Introduction to DATA Step

More information

Pivot Tables, Lookup Tables and Scenarios

Pivot Tables, Lookup Tables and Scenarios Introduction Format and manipulate data using pivot tables. Using a grading sheet as and example you will be shown how to set up and use lookup tables and scenarios. Contents Introduction Contents Pivot

More information

Top 10 SAS Functions in A brief summary of SAS Communities Survey - by Flora Fang Liu

Top 10 SAS Functions in A brief summary of SAS Communities Survey - by Flora Fang Liu Top 10 SAS Functions in 2017 A brief summary of SAS Communities Survey - by Flora Fang Liu 1 What are SAS Functions? Why use SAS Functions? What? SAS functions perform computations, data manipulation,

More information

SAS Training Spring 2006

SAS Training Spring 2006 SAS Training Spring 2006 Coxe/Maner/Aiken Introduction to SAS: This is what SAS looks like when you first open it: There is a Log window on top; this will let you know what SAS is doing and if SAS encountered

More information

STAT 7000: Experimental Statistics I

STAT 7000: Experimental Statistics I STAT 7000: Experimental Statistics I 2. A Short SAS Tutorial Peng Zeng Department of Mathematics and Statistics Auburn University Fall 2009 Peng Zeng (Auburn University) STAT 7000 Lecture Notes Fall 2009

More information

Importing CSV Data to All Character Variables Arthur L. Carpenter California Occidental Consultants, Anchorage, AK

Importing CSV Data to All Character Variables Arthur L. Carpenter California Occidental Consultants, Anchorage, AK PharmaSUG 2017 QT02 Importing CSV Data to All Character Variables Arthur L. Carpenter California Occidental Consultants, Anchorage, AK ABSTRACT Have you ever needed to import data from a CSV file and found

More information

Lecture 1 Getting Started with SAS

Lecture 1 Getting Started with SAS SAS for Data Management, Analysis, and Reporting Lecture 1 Getting Started with SAS Portions reproduced with permission of SAS Institute Inc., Cary, NC, USA Goals of the course To provide skills required

More information

Chapter 3 Analyzing Normal Quantitative Data

Chapter 3 Analyzing Normal Quantitative Data Chapter 3 Analyzing Normal Quantitative Data Introduction: In chapters 1 and 2, we focused on analyzing categorical data and exploring relationships between categorical data sets. We will now be doing

More information

DSCI 325: Handout 24 Introduction to Writing Functions in R Spring 2017

DSCI 325: Handout 24 Introduction to Writing Functions in R Spring 2017 DSCI 325: Handout 24 Introduction to Writing Functions in R Spring 2017 We have already used several existing R functions in previous handouts. For example, consider the Grades dataset. Once the data frame

More information

Measures of Central Tendency

Measures of Central Tendency Page of 6 Measures of Central Tendency A measure of central tendency is a value used to represent the typical or average value in a data set. The Mean The sum of all data values divided by the number of

More information

Introduction to SAS Procedures SAS Basics III. Susan J. Slaughter, Avocet Solutions

Introduction to SAS Procedures SAS Basics III. Susan J. Slaughter, Avocet Solutions Introduction to SAS Procedures SAS Basics III Susan J. Slaughter, Avocet Solutions SAS Essentials Section for people new to SAS Core presentations 1. How SAS Thinks 2. Introduction to DATA Step Programming

More information

Q1: Functions / 33 Q2: Arrays / 47 Q3: Multiple choice / 20 TOTAL SCORE / 100 Q4: EXTRA CREDIT / 10

Q1: Functions / 33 Q2: Arrays / 47 Q3: Multiple choice / 20 TOTAL SCORE / 100 Q4: EXTRA CREDIT / 10 EECE.2160: ECE Application Programming Spring 2018 Exam 2 March 30, 2018 Name: Lecture time (circle 1): 8-8:50 (Sec. 201) 12-12:50 (Sec. 202) For this exam, you may use only one 8.5 x 11 double-sided page

More information

Introduction to DATA Step Programming SAS Basics II. Susan J. Slaughter, Avocet Solutions

Introduction to DATA Step Programming SAS Basics II. Susan J. Slaughter, Avocet Solutions Introduction to DATA Step Programming SAS Basics II Susan J. Slaughter, Avocet Solutions DATA versus PROC steps Two basic parts of SAS programs DATA step PROC step Begin with DATA statement Begin with

More information

Lab #9: ANOVA and TUKEY tests

Lab #9: ANOVA and TUKEY tests Lab #9: ANOVA and TUKEY tests Objectives: 1. Column manipulation in SAS 2. Analysis of variance 3. Tukey test 4. Least Significant Difference test 5. Analysis of variance with PROC GLM 6. Levene test for

More information

Today Function. Note: If you want to retrieve the date and time that the computer is set to, use the =NOW() function.

Today Function. Note: If you want to retrieve the date and time that the computer is set to, use the =NOW() function. Today Function The today function: =TODAY() It has no arguments, and returns the date that the computer is set to. It is volatile, so if you save it and reopen the file one month later the new, updated

More information

Blackboard 9 - Creating Categories in the Grade Center

Blackboard 9 - Creating Categories in the Grade Center University of Southern California Marshall Information Services Blackboard 9 - Creating Categories in the Grade Center Categories allow you to place Blackboard data columns (i.e. non-calculated columns)

More information

Welcome to Top 10 SAS Functions

Welcome to Top 10 SAS Functions Welcome to Top 10 SAS Functions Goal and Agenda By the end of this meeting, you will understand 10 key SAS functions purpose, value and features. What are SAS functions? Why use them? Use Case Manipulating

More information

Introduction to SAS. Cristina Murray-Krezan Research Assistant Professor of Internal Medicine Biostatistician, CTSC

Introduction to SAS. Cristina Murray-Krezan Research Assistant Professor of Internal Medicine Biostatistician, CTSC Introduction to SAS Cristina Murray-Krezan Research Assistant Professor of Internal Medicine Biostatistician, CTSC cmurray-krezan@salud.unm.edu 20 August 2018 What is SAS? Statistical Analysis System,

More information

2. INTRODUCTORY EXCEL

2. INTRODUCTORY EXCEL CS130 - Introductory Excel 1 2. INTRODUCTORY EXCEL Fall 2017 CS130 - Introductory Excel 2 Introduction to Excel What is Microsoft Excel? What can we do with Excel? CS130 - Introductory Excel 3 Launch Excel

More information

Microsoft Excel 2013 Unit 1: Spreadsheet Basics & Navigation Student Packet

Microsoft Excel 2013 Unit 1: Spreadsheet Basics & Navigation Student Packet Microsoft Excel 2013 Unit 1: Spreadsheet Basics & Navigation Student Packet Signing your name below means the work you are turning in is your own work and you haven t given your work to anyone else. Name

More information

MA 113 Calculus I Fall 2015 Exam 2 Tuesday, 20 October Multiple Choice Answers. Question

MA 113 Calculus I Fall 2015 Exam 2 Tuesday, 20 October Multiple Choice Answers. Question MA 113 Calculus I Fall 2015 Exam 2 Tuesday, 20 October 2015 Name: Section: Last digits of student ID #: This exam has ten multiple choice questions (five points each) and five free response questions (ten

More information

RELEASED. Spring 2013 North Carolina Measures of Student Learning: NC s Common Exams. Advanced Functions and Modeling

RELEASED. Spring 2013 North Carolina Measures of Student Learning: NC s Common Exams. Advanced Functions and Modeling Released Form Spring 013 North Carolina Measures of Student Learning: NC s Common Exams Advanced Functions and Modeling Public Schools of North Carolina State Board of Education Department of Public Instruction

More information

Excel Functions & Tables

Excel Functions & Tables Excel Functions & Tables Fall 2012 Fall 2012 CS130 - Excel Functions & Tables 1 Review of Functions Quick Mathematics Review As it turns out, some of the most important mathematics for this course revolves

More information

Formulas and Functions

Formulas and Functions Conventions used in this document: Keyboard keys that must be pressed will be shown as Enter or Ctrl. Controls to be activated with the mouse will be shown as Start button > Settings > System > About.

More information

SAS and Data Management Kim Magee. Department of Biostatistics College of Public Health

SAS and Data Management Kim Magee. Department of Biostatistics College of Public Health SAS and Data Management Kim Magee Department of Biostatistics College of Public Health Review of Previous Material Review INFILE statement data bp; infile c:\sas\bp.csv dlm=, ; input clinic $ dbp1 sbp1

More information

Writing Programs in SAS Data I/O in SAS

Writing Programs in SAS Data I/O in SAS Writing Programs in SAS Data I/O in SAS Statistics 135 Autumn 2005 Copyright c 2005 by Mark E. Irwin Writing SAS Programs Your SAS programs can be written in any text editor, though you will often want

More information

AMSC/CMSC 460 Final Exam, Fall 2007

AMSC/CMSC 460 Final Exam, Fall 2007 AMSC/CMSC 460 Final Exam, Fall 2007 Show all work. You may leave arithmetic expressions in any form that a calculator could evaluate. By putting your name on this paper, you agree to abide by the university

More information

As your databases continue to evolve, you will need to incorporate advanced queries and reports. This chapter addresses how to create and use action

As your databases continue to evolve, you will need to incorporate advanced queries and reports. This chapter addresses how to create and use action As your databases continue to evolve, you will need to incorporate advanced queries and reports. This chapter addresses how to create and use action queries and how to create queries that perform more

More information

Producing Summary Tables in SAS Enterprise Guide

Producing Summary Tables in SAS Enterprise Guide Producing Summary Tables in SAS Enterprise Guide Lora D. Delwiche, University of California, Davis, CA Susan J. Slaughter, Avocet Solutions, Davis, CA ABSTRACT This paper shows, step-by-step, how to use

More information

Separate, Split & Remove Substring & Number from Text with Excel Functions & VBA

Separate, Split & Remove Substring & Number from Text with Excel Functions & VBA [Editor s Note: This is a guide on how to separate, split & remove substring & numbers from text using Excel Functions and VBA. Examples of substring functions are CHAR, FIND, LEFT, LOWER, MID, PROPER,

More information

SAS Online Training: Course contents: Agenda:

SAS Online Training: Course contents: Agenda: SAS Online Training: Course contents: Agenda: (1) Base SAS (6) Clinical SAS Online Training with Real time Projects (2) Advance SAS (7) Financial SAS Training Real time Projects (3) SQL (8) CV preparation

More information

Summer Packet for Students Enrolled in Honors Geometry School Year

Summer Packet for Students Enrolled in Honors Geometry School Year Summer Packet for Students Enrolled in Honors Geometry 2016-2017 School Year Dear Parents and Students, This math packet contains 51 problems related to the 9 th grade Common Core mathematics curriculum.

More information

Checking for Duplicates Wendi L. Wright

Checking for Duplicates Wendi L. Wright Checking for Duplicates Wendi L. Wright ABSTRACT This introductory level paper demonstrates a quick way to find duplicates in a dataset (with both simple and complex keys). It discusses what to do when

More information

Gradebook - Grades Tab Create Assignment

Gradebook - Grades Tab Create Assignment Gradebook - Grades Tab Create Assignment If no assignments have been created for the selected class in the selected term, the student names will not display. No Grades Found will be displayed where the

More information

MATH& 146 Lesson 8. Section 1.6 Averages and Variation

MATH& 146 Lesson 8. Section 1.6 Averages and Variation MATH& 146 Lesson 8 Section 1.6 Averages and Variation 1 Summarizing Data The distribution of a variable is the overall pattern of how often the possible values occur. For numerical variables, three summary

More information

SAS seminar. The little SAS book Chapters 3 & 4. April 15, Åsa Klint. By LD Delwiche and SJ Slaughter. 3.1 Creating and Redefining variables

SAS seminar. The little SAS book Chapters 3 & 4. April 15, Åsa Klint. By LD Delwiche and SJ Slaughter. 3.1 Creating and Redefining variables SAS seminar April 15, 2003 Åsa Klint The little SAS book Chapters 3 & 4 By LD Delwiche and SJ Slaughter Data step - read and modify data - create a new dataset - performs actions on rows Proc step - use

More information

As long as anyone in the classroom is working on the exam, there will be no talking.

As long as anyone in the classroom is working on the exam, there will be no talking. Information: There is no talking during the exam. As long as anyone in the classroom is working on the exam, there will be no talking. You will receive a single warning for talking. If you continue to

More information

SAS 9 Programming Enhancements Marje Fecht, Prowerk Consulting Ltd Mississauga, Ontario, Canada

SAS 9 Programming Enhancements Marje Fecht, Prowerk Consulting Ltd Mississauga, Ontario, Canada SAS 9 Programming Enhancements Marje Fecht, Prowerk Consulting Ltd Mississauga, Ontario, Canada ABSTRACT Performance improvements are the well-publicized enhancement to SAS 9, but what else has changed

More information

Introduction to SAS Procedures SAS Basics III. Susan J. Slaughter, Avocet Solutions

Introduction to SAS Procedures SAS Basics III. Susan J. Slaughter, Avocet Solutions Introduction to SAS Procedures SAS Basics III Susan J. Slaughter, Avocet Solutions DATA versus PROC steps Two basic parts of SAS programs DATA step PROC step Begin with DATA statement Begin with PROC statement

More information

STAAR Category 3 Grade 7 Mathematics TEKS 7.9D. Student Activity 1

STAAR Category 3 Grade 7 Mathematics TEKS 7.9D. Student Activity 1 Student Activity 1 Work with your partner to answer the following questions. Problem 1: A triangular prism has lateral faces and faces called bases. The bases are in the shape of a. The lateral faces are

More information

Excel Functions & Tables

Excel Functions & Tables Excel Functions & Tables Fall 2014 Fall 2014 CS130 - Excel Functions & Tables 1 Review of Functions Quick Mathematics Review As it turns out, some of the most important mathematics for this course revolves

More information

Getting Started with the XML Engine

Getting Started with the XML Engine 3 CHAPTER 1 Getting Started with the XML Engine What Does the XML Engine Do? 3 Understanding How the XML Engine Works 3 Assigning a Libref to an XML Document 3 Importing an XML Document 4 Exporting an

More information

Grading Schemas. Blackboard Learn Grade Center

Grading Schemas. Blackboard Learn Grade Center Grading Schemas Blackboard Learn Grade Center Creating a Grading Schema... 1 Editing a Grading Schema... 3 Deleting a Grading Schema... 4 Copying a Grading Schema... 5 Assigning a Grading Schema to a Grade

More information

NAME: 1a. (10 pts.) Describe the characteristics of numbers for which this floating-point data type is well-suited. Give an example.

NAME: 1a. (10 pts.) Describe the characteristics of numbers for which this floating-point data type is well-suited. Give an example. MSU CSC 285 Spring, 2007 Exam 2 (5 pgs.) NAME: 1. Suppose that a eight-bit floating-point data type is defined with the eight bits divided into fields as follows, where the bits are numbered with zero

More information

Chapter 6: Modifying and Combining Data Sets

Chapter 6: Modifying and Combining Data Sets Chapter 6: Modifying and Combining Data Sets The SET statement is a powerful statement in the DATA step. Its main use is to read in a previously created SAS data set which can be modified and saved as

More information

PROGRAMS. EXCELLENT ACADEMY OF ENGINEERING. Telephone: / NORMAL PROGRAM

PROGRAMS. EXCELLENT ACADEMY OF ENGINEERING. Telephone: / NORMAL PROGRAM PROGRAMS NORMAL PROGRAM 1. Wap to display months in words where month in number is input. 2. Wap to print Fibonacci series till n elements. 3. Wap to reverse 4 digit numbers. 4. Wap to accept a number

More information

STANDARDS OF LEARNING CONTENT REVIEW NOTES ALGEBRA I. 4 th Nine Weeks,

STANDARDS OF LEARNING CONTENT REVIEW NOTES ALGEBRA I. 4 th Nine Weeks, STANDARDS OF LEARNING CONTENT REVIEW NOTES ALGEBRA I 4 th Nine Weeks, 2016-2017 1 OVERVIEW Algebra I Content Review Notes are designed by the High School Mathematics Steering Committee as a resource for

More information

METHODS EXERCISES GuessNumber and Sample run SumAll Sample Run

METHODS EXERCISES GuessNumber and Sample run SumAll Sample Run METHODS EXERCISES Write a method called GuessNumber that receives nothing and returns back nothing. The method first picks a random number from 1-100. The user then keeps guessing as long as their guess

More information

Using Excel for a Gradebook: Advanced Gradebook Formulas

Using Excel for a Gradebook: Advanced Gradebook Formulas Using Excel for a Gradebook: Advanced Gradebook Formulas Objective 1: Review basic formula concepts. Review Basic Formula Concepts Entering a formula by hand: Always start with an equal sign, and click

More information

23.2 Normal Distributions

23.2 Normal Distributions 1_ Locker LESSON 23.2 Normal Distributions Common Core Math Standards The student is expected to: S-ID.4 Use the mean and standard deviation of a data set to fit it to a normal distribution and to estimate

More information

Beginner Beware: Hidden Hazards in SAS Coding

Beginner Beware: Hidden Hazards in SAS Coding ABSTRACT SESUG Paper 111-2017 Beginner Beware: Hidden Hazards in SAS Coding Alissa Wise, South Carolina Department of Education New SAS programmers rely on errors, warnings, and notes to discover coding

More information

Full file at

Full file at Java Programming: From Problem Analysis to Program Design, 3 rd Edition 2-1 Chapter 2 Basic Elements of Java At a Glance Instructor s Manual Table of Contents Overview Objectives s Quick Quizzes Class

More information

Download Grader Exam Scores and Upload Scores Into Canvas Grade Book

Download Grader Exam Scores and Upload Scores Into Canvas Grade Book Download Grader Exam Scores and Upload Scores Into Canvas Grade Book Instructors can down load their exam scores from the CSU Grader system and upload those scores into their Canvas grade book. Instructors

More information

Level I: Getting comfortable with my data in SAS. Descriptive Statistics

Level I: Getting comfortable with my data in SAS. Descriptive Statistics Level I: Getting comfortable with my data in SAS. Descriptive Statistics Quick Review of reading Data into SAS Preparing Data 1. Variable names in the first row make sure they are appropriate for the statistical

More information

Biostatistics & SAS programming. Kevin Zhang

Biostatistics & SAS programming. Kevin Zhang Biostatistics & SAS programming Kevin Zhang January 26, 2017 Biostat 1 Instructor Instructor: Dong Zhang (Kevin) Office: Ben Franklin Hall 227 Phone: 570-389-4556 Email: dzhang(at)bloomu.edu Class web:

More information

Data Cleansing Functions Caroline Bahler, Meridian Software Inc

Data Cleansing Functions Caroline Bahler, Meridian Software Inc Data Cleansing Functions Caroline Bahler, Meridian Software Inc Introduction Functions are small programming subroutines and can be defined as the work horses of any data cleansing operation. Dirty data,

More information

DSCI 325 Practice Midterm Questions Spring In SAS, a statement must end

DSCI 325 Practice Midterm Questions Spring In SAS, a statement must end DSCI 325 Practice Midterm Questions Spring 2016 1. In SAS, a statement must end a. with a colon b. with a semicolon c. in a new line d. with the command RUN 2. Which of the following is a valid variable

More information

Creating and Manipulating Grade Scheme

Creating and Manipulating Grade Scheme 1 Creating and Manipulating Grade Scheme The default organization scheme is Percentage. You can stay with it or set up your own custom grade scheme(s) to fit your needs. For instance, you can set up a

More information

Topic C. Communicating the Precision of Measured Numbers

Topic C. Communicating the Precision of Measured Numbers Topic C. Communicating the Precision of Measured Numbers C. page 1 of 14 Topic C. Communicating the Precision of Measured Numbers This topic includes Section 1. Reporting measurements Section 2. Rounding

More information

Chp1 Measurement. = 168 in. notice ft cancels and we are left with. 4.25, so 4ft exactly, ignore the decimal. Math 10 Pre-Calc &Foundations

Chp1 Measurement. = 168 in. notice ft cancels and we are left with. 4.25, so 4ft exactly, ignore the decimal. Math 10 Pre-Calc &Foundations Chp1 Measurement 1.1 Imperial Measurement used in construction and in America mostly. Skill converting with in Imperial, using the unit conversion method Common Conversion Factors Ex#1 convert 14ft to

More information

Business Spreadsheets

Business Spreadsheets COURSE 6411 Computer Applications I Unit B COMPETENCY 4.00 B2 25% OBJECTIVE 4.01 B2 20% Software Applications for Business Understand spreadsheets, charts, and graphs used in business. Understand spreadsheets

More information

Part 2 Uploading and Working with WebCT's File Manager and Student Management INDEX

Part 2 Uploading and Working with WebCT's File Manager and Student Management INDEX Part 2 Uploading and Working with WebCT's File Manager and Student Management INDEX Uploading to and working with WebCT's File Manager... Page - 1 uploading files... Page - 3 My-Files... Page - 4 Unzipping

More information

Accessing Electronic Facilities and Resources

Accessing Electronic Facilities and Resources Before You Begin Accessing Electronic Facilities and Resources Student ID Vs User Name As a Chula student, you have 2 important identification numbers: student ID and user name. They may look alike, for

More information

Stat 302 Statistical Software and Its Applications SAS: Data I/O

Stat 302 Statistical Software and Its Applications SAS: Data I/O Stat 302 Statistical Software and Its Applications SAS: Data I/O Yen-Chi Chen Department of Statistics, University of Washington Autumn 2016 1 / 33 Getting Data Files Get the following data sets from the

More information

Measures of Central Tendency. A measure of central tendency is a value used to represent the typical or average value in a data set.

Measures of Central Tendency. A measure of central tendency is a value used to represent the typical or average value in a data set. Measures of Central Tendency A measure of central tendency is a value used to represent the typical or average value in a data set. The Mean the sum of all data values divided by the number of values in

More information

Activity: page 1/10 Introduction to Excel. Getting Started

Activity: page 1/10 Introduction to Excel. Getting Started Activity: page 1/10 Introduction to Excel Excel is a computer spreadsheet program. Spreadsheets are convenient to use for entering and analyzing data. Although Excel has many capabilities for analyzing

More information

Respondus: Instructions for Faculty (631) In this document: What is Respondus? Downloading and installing Respondus:

Respondus: Instructions for Faculty (631) In this document: What is Respondus? Downloading and installing Respondus: 1 Respondus: Instructions for Faculty (631) 632-2777 Teaching, Learning + Technology Stony Brook University In this document: 1. What is Respondus? 2. Downloading and installing Respondus 3. Changing where

More information

Answers Investigation 4

Answers Investigation 4 Answers Applications 1 4. Patterns 2 and 4 can fold to form closed boxes. Patterns 1 and 3 cannot fold to form closed boxes. 10. Sketch of box and possible net: 5. a. Figures 1 and 2 can be folded to form

More information

CSCE 120: Learning To Code

CSCE 120: Learning To Code CSCE 120: Learning To Code Manipulating Data I Introduction This module is designed to get you started working with data by understanding and using variables and data types in JavaScript. It will also

More information

MAT 142 College Mathematics. Module ST. Statistics. Terri Miller revised July 14, 2015

MAT 142 College Mathematics. Module ST. Statistics. Terri Miller revised July 14, 2015 MAT 142 College Mathematics Statistics Module ST Terri Miller revised July 14, 2015 2 Statistics Data Organization and Visualization Basic Terms. A population is the set of all objects under study, a sample

More information

Stat 302 Statistical Software and Its Applications SAS: Working with Data

Stat 302 Statistical Software and Its Applications SAS: Working with Data 1 Stat 302 Statistical Software and Its Applications SAS: Working with Data Fritz Scholz Department of Statistics, University of Washington Winter Quarter 2015 February 26, 2015 2 Outline Chapter 7 in

More information

Merging Mailing Labels in Office 2007

Merging Mailing Labels in Office 2007 The Company Rocks Merging Mailing Labels in Office 2007 Step-by-step instructions to accompany video lessons Danny Rocks 4/15/2011 Merging Mailing Labels in Microsoft Office 2007 Despite the popularity

More information

6 th Grade Math Cylinder Task. c) Draw a net (pattern) for the manufacturer to use to make the can.

6 th Grade Math Cylinder Task. c) Draw a net (pattern) for the manufacturer to use to make the can. 6 th Grade Math a) Explain what is meant by surface area. What steps would you take to find the surface area of a cylinder? b) One of the major expenses in manufacturing a can is the amount of metal that

More information

EDIT202 Spreadsheet Lab Prep Sheet

EDIT202 Spreadsheet Lab Prep Sheet EDIT202 Spreadsheet Lab Prep Sheet While it is clear to see how a spreadsheet may be used in a classroom to aid a teacher in marking (as your lab will clearly indicate), it should be noted that spreadsheets

More information

Spreadsheet Management Software Cases. Evaluate the effectiveness of an e-commerce company s Web site and advertising sites

Spreadsheet Management Software Cases. Evaluate the effectiveness of an e-commerce company s Web site and advertising sites 31 Spreadsheet Case 2 Athena Beauty Products Problem: Management skills: Excel skills: File: Evaluate the effectiveness of an e-commerce company s Web site and advertising sites Analyzing Organizing Formulas

More information

A C E. Answers Investigation 4. Applications. b. Possible answers:

A C E. Answers Investigation 4. Applications. b. Possible answers: Answers Applications 4. Patterns and 4 can fold to form closed boxes. Patterns and cannot fold to form closed boxes. 5. a. Figures and can be folded to form a closed box. Pattern C cannot. b. Figure :

More information

ECE264 Fall 2013 Exam 1, September 24, 2013

ECE264 Fall 2013 Exam 1, September 24, 2013 ECE264 Fall 2013 Exam 1, September 24, 2013 In signing this statement, I hereby certify that the work on this exam is my own and that I have not copied the work of any other student while completing it.

More information

Name: Date: Period: Chapter 2. Section 1: Describing Location in a Distribution

Name: Date: Period: Chapter 2. Section 1: Describing Location in a Distribution Name: Date: Period: Chapter 2 Section 1: Describing Location in a Distribution Suppose you earned an 86 on a statistics quiz. The question is: should you be satisfied with this score? What if it is the

More information

ORGANIZING THE DATA IN A FREQUENCY TABLE

ORGANIZING THE DATA IN A FREQUENCY TABLE ORGANIZING THE DATA IN A FREQUENCY TABLE Suppose the scores obtained by 5 students on a standardized test are as follows: 68, 55, 61, 55, 43, 59, 55, 58, 77, 6, 56, 53, 58, 7, 57, 62, 5, 69, 44, 63, 48,79,

More information

Measures of Dispersion

Measures of Dispersion Lesson 7.6 Objectives Find the variance of a set of data. Calculate standard deviation for a set of data. Read data from a normal curve. Estimate the area under a curve. Variance Measures of Dispersion

More information

Summarizing Impossibly Large SAS Data Sets For the Data Warehouse Server Using Horizontal Summarization

Summarizing Impossibly Large SAS Data Sets For the Data Warehouse Server Using Horizontal Summarization Summarizing Impossibly Large SAS Data Sets For the Data Warehouse Server Using Horizontal Summarization Michael A. Raithel, Raithel Consulting Services Abstract Data warehouse applications thrive on pre-summarized

More information

Experiment 3 Microsoft Excel in Scientific Applications I

Experiment 3 Microsoft Excel in Scientific Applications I Experiment 3 Microsoft Excel in Scientific Applications I OUTCOMES After completing this experiment, the student should be able to: demonstrate basic computer survival skills (opening, closing, printing

More information

Spreadsheet Case 2. Clarkson Cosmetics

Spreadsheet Case 2. Clarkson Cosmetics 27 Spreadsheet Case 2 Clarkson Cosmetics Problem: Management skills: PC skills: File: Evaluate the effectiveness of an e-commerce company s Web site and advertising sites Analyzing Organizing Formulas

More information

DSCI 325: Handout 1 Introduction to SAS Programs Spring 2017

DSCI 325: Handout 1 Introduction to SAS Programs Spring 2017 DSCI 325: Handout 1 Introduction to SAS Programs Spring 2017 SAS (which originally stood for Statistical Analysis System) was started in 1976 and since this time has become an industry standard in the

More information

CSE 143 Final Exam Part 1 - August 18, 2011, 9:40 am

CSE 143 Final Exam Part 1 - August 18, 2011, 9:40 am CSE 143 Final Exam Part 1 - August 18, 2011, 9:40 am Name Student ID # Section TA Name The exam is closed book, closed notes, closed devices, except that you may have a 5x8 card with handwritten notes

More information

PROGRESS BOOK PARENT ACCESS NAVIGATION

PROGRESS BOOK PARENT ACCESS NAVIGATION PROGRESS BOOK PARENT ACCESS NAVIGATION Enter the following web address into your internet browser. https://parent.laca.org From the resulting screen, you can click on your child s school district icon.

More information

Introductory SAS example

Introductory SAS example Introductory SAS example STAT:5201 1 Introduction SAS is a command-driven statistical package; you enter statements in SAS s language, submit them to SAS, and get output. A fairly friendly user interface

More information

Volume of Cylinders. Volume of Cones. Example Find the volume of the cylinder. Round to the nearest tenth.

Volume of Cylinders. Volume of Cones. Example Find the volume of the cylinder. Round to the nearest tenth. Volume of Cylinders As with prisms, the area of the base of a cylinder tells the number of cubic units in one layer. The height tells how many layers there are in the cylinder. The volume V of a cylinder

More information