ST Lab 1 - The basics of SAS

Size: px
Start display at page:

Download "ST Lab 1 - The basics of SAS"

Transcription

1 ST Lab 1 - The basics of SAS What is SAS? SAS is a programming language based in C. For the most part SAS works in procedures called proc s. For instance, to do a correlation analysis there is proc corr. Today we will start with the basics: The SAS interface, reading in data, and running a few procedures. You can download SAS for your personal computer - See (It requires more than Windows Home though.) The SAS Interface There are four main windows in the SAS environment: The Program Editor Window This is where you spend most of your time working in SAS, writing your program in the editing window. Note: SAS is not case sensitive. The Log Window Once you execute your program, SAS will report back to you in this window. Error messages, notes about your dataset, and warning messages will appear here. Don t underestimate the importance of this window remember to look here each and every time you execute a SAS program. The Output Window The output requested in your SAS program will appear in this window. Remember that output may be generated even when errors are present in your program! The Results Window The output is listed by section here. Click on an item and you are taken to that place in the output. The explorer subtab allows you to keep track of your libraries and their contents. 1

2 Note: to end a line in SAS, a semicolon is used! First Lines and Reading in Data Now we are ready to read in some data. There are a few options to read in data: 1. Copy and Paste the data into the Program Editor Window with the correct code before and after. 2. Use the SAS import wizard 3. Use SAS commands that call a file Let s get started! 1. Copy and Paste method: Go to the wolfware page, Lab section. Here you will find a file called soilwater.dat. Open the link and copy and paste the data into the program editor after your options command. To create data in SAS we use the data command (called a data step). data name; input variable1 variable2...; datalines; # #... # # # #... ; Note, if one of our variables was non-numeric (e.g. had values A B etc.) We would need to put a $ after the variable name in the input statement (input variable1 $ variable2... declares variable1 to be a character variable). Create the data step to read in the soil water data. Don t paste in the column names! Once you have the code, highlight the part you want to run (include the options command the first time you run something). Now you can simply click the running man button at the top of the page (or use the SAS menus). To check if the data is read in correctly, as should always be done after submitting code, first check the log for errors. Then we can print the data out to see it. To do this we use a procedure called proc print. proc print data=name; If you ever get confused on a procedure s syntax, you can google sas proc - help. The first link should take you to SAS s very nice online documentation system. (Try it.) Highlight this section of code and run it to see your output! 2

3 2. Import Wizard Method: SAS has an import wizard that can read in many standard types of data files. First, go to the class website and download the mother.xls file (make sure you know where it is saving to!). Now, go to File Import Data. The import wizard will pop up. You can choose a standard source from the drop down menu. Mother.xls is an excel 95 file (SAS can t read in xlsx files). Hit next and browse to the location of the file. Hit next, now type in the name of the dataset you want to create (e.g. mother). Hit next, SAS will ask if you want to save the commands for importing the file. Hit browse and find the folder you would like to save the file to, type in the file name and hit save. Finally, hit finish. Check your log to see if there are any errors. Print the data out to check that it was read in correctly. 3. SAS commands: You can also read data in using a few commands in SAS. Find the file that contained the commands for importing a file and open it. Copy and paste the code into the program editor. In the future you can use these commands to read in the data rather than using the import wizard. You may need to change the file path however. You can set the default file path in SAS using the following: Go to Tools Options Change Current Folder. From here you can select the default folder for SAS to look in. Choose the folder with the file mother.xls. Once you do this, you can remove any directory names, e.g. DATAFILE= J:\ST 512\Labs\Mother.xls can be replaced by DATAFILE= Mother.xls There are other ways to import data in SAS such as infile. If interested, search the SAS help pages. 3

4 The Corr and Reg Procedures Description of the Soil Water data set: The data set contains the measured soil water content (in cm 3 /cm 3 ) of 16 soil samples at four depths (in cms). Description of the Mother data set: Weight gain of the mother during pregnancy is known to be a critical factor in determining the birth-weight of the infant. Some data collected in a study of the relationship between average weight gain and mother s age are given in the file mother.xls. Some questions we may want to answer from these types of data sets: 1. Is there an association between the two variables? 2. If so, does that association appear to be linear? 3. Can we conduct a statistical test to determine this relationship is statistically significant? 4. Can we fit a linear regression line to this data? 5. How can we use that line to predict for future observations? Let s go through the soil water data together, then you can attempt the mother data set on your own. 1. To answer the first two questions, we can invoke the corr procedure. proc corr data=soilwater; var depth soil; Run this code and inspect the output. To get the tests we will cover in class (and some nice plots), add in the following: ods graphics on; proc corr data=soilwater plots=matrix fisher(biasadj=no); var depth soil; ods graphics off; Run this code and inspect the plots. Use the output to answer the first 3 questions above. There are many other options for tests that can be performed using the proc corr procedure. Check out for more information. 4

5 Let us look into fitting a regression line with this data. Which variable would we consider our response (dependent variable), which our predictor (independent variable)? We can use proc reg to fit a regression line (we could also use the proc glm or proc mixed, which will be discussed later in the course). The basic code to invoke the reg procedure is: proc reg data=soilwater; model soil=depth; Run this code and inspect the output. What hypotheses are being tested by each p-value you see? To see a scatterplot with a regression line, residual diagnostics, predicted values, and confidence intervals for our parameter estimates we can run the following: ods graphics on; proc reg data=soilwater; model soil=depth/r clb; ods graphics off; Inspect the output and plots. Does the line appear to fit the data on the scatterplot well? Do the residuals appear to have constant variance? What do our confidence intervals tell us about our parameter estimates? We can see that by adding /r to the model statement we get information on the predicted value of any value of the independent variable that was included in our data set. How can we get other predicted values (e.g. for a depth of 12.5 cm or 49 cm)? We can use the equation given to estimate the predicted values or have SAS To do this we can trick SAS into giving us a predicted value by appending missing values onto our data set. SAS sees a. as a missing value, so we can run the following code: 5

6 data newdepths; input depth soil; datalines; ; proc datasets; append base=soilwater data=newdepths; Run this code, check the log to make sure everything worked, and use proc print to print out the new soilwater data set. Now if we run the same proc reg code with /r we will get predicted values at depths of 12.5 and 49. (Note, we can also get C.I. s and P.I. s for these values, which we will talk about at a later time.) Try to answer the following questions about the mother data set on your own: 1. What is the sample correlation between weight gain and age? 2. Is the sample correlation significantly different from zero? 3. Which variable would we consider the response and which the independent variable? Why? 4. Fit a regression line to the data, is the slope significantly different from 0? 5. Do the data appear to satisfy the assumption of constant variance? 6. Predict the value of weight gain for someone who is 20 years old and someone who is 35 years old. 6

Applied Regression Modeling: A Business Approach

Applied Regression Modeling: A Business Approach i Applied Regression Modeling: A Business Approach Computer software help: SAS code SAS (originally Statistical Analysis Software) is a commercial statistical software package based on a powerful programming

More information

(on CQUEST) A.L. Gibbs

(on CQUEST) A.L. Gibbs STA 302 / 1001 Introduction to SAS for Regression (on CQUEST) A.L. Gibbs September 2009 1 Some Basics of CQUEST The operating system in the RW labs (107/109 and 211) is Windows XP. There are a few terminals

More information

SAS Workshop. Introduction to SAS Programming. Iowa State University DAY 2 SESSION IV

SAS Workshop. Introduction to SAS Programming. Iowa State University DAY 2 SESSION IV SAS Workshop Introduction to SAS Programming DAY 2 SESSION IV Iowa State University May 10, 2016 Controlling ODS graphical output from a procedure Many SAS procedures produce default plots in ODS graphics

More information

A Step by Step Guide to Learning SAS

A Step by Step Guide to Learning SAS A Step by Step Guide to Learning SAS 1 Objective Familiarize yourselves with the SAS programming environment and language. Learn how to create and manipulate data sets in SAS and how to use existing data

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

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

INTRODUCTION TO SAS STAT 525 FALL 2013

INTRODUCTION TO SAS STAT 525 FALL 2013 INTRODUCTION TO SAS STAT 525 FALL 2013 Statistical analyses, in practice, are always carried out by computer software In this class, I will focus on the use of SAS to perform these analyses, specifically

More information

Applied Regression Modeling: A Business Approach

Applied Regression Modeling: A Business Approach i Applied Regression Modeling: A Business Approach Computer software help: SAS SAS (originally Statistical Analysis Software ) is a commercial statistical software package based on a powerful programming

More information

Introductory Guide to SAS:

Introductory Guide to SAS: Introductory Guide to SAS: For UVM Statistics Students By Richard Single Contents 1 Introduction and Preliminaries 2 2 Reading in Data: The DATA Step 2 2.1 The DATA Statement............................................

More information

Introduction to Statistical Analyses in SAS

Introduction to Statistical Analyses in SAS Introduction to Statistical Analyses in SAS Programming Workshop Presented by the Applied Statistics Lab Sarah Janse April 5, 2017 1 Introduction Today we will go over some basic statistical analyses in

More information

Some Basics of CQUEST

Some Basics of CQUEST Some Basics of CQUEST The operating system in RW labs (107/109 and 211) is Windows XP. There are a few terminals in RW 213 running Linux. SAS is run from a Linux Server. Your account is the same and files

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

EXST 7014, Lab 1: Review of R Programming Basics and Simple Linear Regression

EXST 7014, Lab 1: Review of R Programming Basics and Simple Linear Regression EXST 7014, Lab 1: Review of R Programming Basics and Simple Linear Regression OBJECTIVES 1. Prepare a scatter plot of the dependent variable on the independent variable 2. Do a simple linear regression

More information

(on CQUEST) A.L. Gibbs

(on CQUEST) A.L. Gibbs STA 302 / 1001 Introduction to SAS for Regression (on CQUEST) A.L. Gibbs September 2007 1 Some Basics of CQUEST The operating system in the ESC lab (1046) is Linux. The operating system in the RW labs

More information

Chapter 2 The SAS Environment

Chapter 2 The SAS Environment Chapter 2 The SAS Environment Abstract In this chapter, we begin to become familiar with the basic SAS working environment. We introduce the basic 3-screen layout, how to navigate the SAS Explorer window,

More information

THIS IS NOT REPRESNTATIVE OF CURRENT CLASS MATERIAL. STOR 455 Midterm 1 September 28, 2010

THIS IS NOT REPRESNTATIVE OF CURRENT CLASS MATERIAL. STOR 455 Midterm 1 September 28, 2010 THIS IS NOT REPRESNTATIVE OF CURRENT CLASS MATERIAL STOR 455 Midterm September 8, INSTRUCTIONS: BOTH THE EXAM AND THE BUBBLE SHEET WILL BE COLLECTED. YOU MUST PRINT YOUR NAME AND SIGN THE HONOR PLEDGE

More information

Introduction to Stata: An In-class Tutorial

Introduction to Stata: An In-class Tutorial Introduction to Stata: An I. The Basics - Stata is a command-driven statistical software program. In other words, you type in a command, and Stata executes it. You can use the drop-down menus to avoid

More information

1 Downloading files and accessing SAS. 2 Sorting, scatterplots, correlation and regression

1 Downloading files and accessing SAS. 2 Sorting, scatterplots, correlation and regression Statistical Methods and Computing, 22S:30/105 Instructor: Cowles Lab 2 Feb. 6, 2015 1 Downloading files and accessing SAS. We will be using the billion.dat dataset again today, as well as the OECD dataset

More information

Lab 1. Introduction to R & SAS. R is free, open-source software. Get it here:

Lab 1. Introduction to R & SAS. R is free, open-source software. Get it here: Lab 1. Introduction to R & SAS R is free, open-source software. Get it here: http://tinyurl.com/yfet8mj for your own computer. 1.1. Using R like a calculator Open R and type these commands into the R Console

More information

Reading data in SAS and Descriptive Statistics

Reading data in SAS and Descriptive Statistics P8130 Recitation 1: Reading data in SAS and Descriptive Statistics Zilan Chai Sep. 18 th /20 th 2017 Outline Intro to SAS (windows, basic rules) Getting Data into SAS Descriptive Statistics SAS Windows

More information

Lab #1: Introduction to Basic SAS Operations

Lab #1: Introduction to Basic SAS Operations Lab #1: Introduction to Basic SAS Operations Getting Started: OVERVIEW OF SAS (access lab pages at http://www.stat.lsu.edu/exstlab/) There are several ways to open the SAS program. You may have a SAS icon

More information

Introduction to STATA

Introduction to STATA Introduction to STATA Duah Dwomoh, MPhil School of Public Health, University of Ghana, Accra July 2016 International Workshop on Impact Evaluation of Population, Health and Nutrition Programs Learning

More information

CLAREMONT MCKENNA COLLEGE. Fletcher Jones Student Peer to Peer Technology Training Program. Basic Statistics using Stata

CLAREMONT MCKENNA COLLEGE. Fletcher Jones Student Peer to Peer Technology Training Program. Basic Statistics using Stata CLAREMONT MCKENNA COLLEGE Fletcher Jones Student Peer to Peer Technology Training Program Basic Statistics using Stata An Introduction to Stata A Comparison of Statistical Packages... 3 Opening Stata...

More information

An introduction to SPSS

An introduction to SPSS An introduction to SPSS To open the SPSS software using U of Iowa Virtual Desktop... Go to https://virtualdesktop.uiowa.edu and choose SPSS 24. Contents NOTE: Save data files in a drive that is accessible

More information

Introduction to SAS. I. Understanding the basics In this section, we introduce a few basic but very helpful commands.

Introduction to SAS. I. Understanding the basics In this section, we introduce a few basic but very helpful commands. Center for Teaching, Research and Learning Research Support Group American University, Washington, D.C. Hurst Hall 203 rsg@american.edu (202) 885-3862 Introduction to SAS Workshop Objective This workshop

More information

STATA 13 INTRODUCTION

STATA 13 INTRODUCTION STATA 13 INTRODUCTION Catherine McGowan & Elaine Williamson LONDON SCHOOL OF HYGIENE & TROPICAL MEDICINE DECEMBER 2013 0 CONTENTS INTRODUCTION... 1 Versions of STATA... 1 OPENING STATA... 1 THE STATA

More information

Introduction. About this Document. What is SPSS. ohow to get SPSS. oopening Data

Introduction. About this Document. What is SPSS. ohow to get SPSS. oopening Data Introduction About this Document This manual was written by members of the Statistical Consulting Program as an introduction to SPSS 12.0. It is designed to assist new users in familiarizing themselves

More information

Introduction to Stata

Introduction to Stata Introduction to Stata Introduction In introductory biostatistics courses, you will use the Stata software to apply statistical concepts and practice analyses. Most of the commands you will need are available

More information

Applied Regression Modeling: A Business Approach

Applied Regression Modeling: A Business Approach i Applied Regression Modeling: A Business Approach Computer software help: SPSS SPSS (originally Statistical Package for the Social Sciences ) is a commercial statistical software package with an easy-to-use

More information

Getting started with Stata 2017: Cheat-sheet

Getting started with Stata 2017: Cheat-sheet Getting started with Stata 2017: Cheat-sheet 4. september 2017 1 Get started Graphical user interface (GUI). Clickable. Simple. Commands. Allows for use of do-le. Easy to keep track. Command window: Write

More information

CH5: CORR & SIMPLE LINEAR REFRESSION =======================================

CH5: CORR & SIMPLE LINEAR REFRESSION ======================================= STAT 430 SAS Examples SAS5 ===================== ssh xyz@glue.umd.edu, tap sas913 (old sas82), sas https://www.statlab.umd.edu/sasdoc/sashtml/onldoc.htm CH5: CORR & SIMPLE LINEAR REFRESSION =======================================

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

Depending on the computer you find yourself in front of, here s what you ll need to do to open SPSS.

Depending on the computer you find yourself in front of, here s what you ll need to do to open SPSS. 1 SPSS 11.5 for Windows Introductory Assignment Material covered: Opening an existing SPSS data file, creating new data files, generating frequency distributions and descriptive statistics, obtaining printouts

More information

Introduction to SAS: General

Introduction to SAS: General Spring 2019 CJ Anderson Introduction to SAS: General Go to course web-site and click on hsb-datasas There are 5 main working environments (windows) in SAS: Explorer window: Lets you view data in SAS data

More information

PHPM 672/677 Lab #2: Variables & Conditionals Due date: Submit by 11:59pm Monday 2/5 with Assignment 2

PHPM 672/677 Lab #2: Variables & Conditionals Due date: Submit by 11:59pm Monday 2/5 with Assignment 2 PHPM 672/677 Lab #2: Variables & Conditionals Due date: Submit by 11:59pm Monday 2/5 with Assignment 2 Overview Most assignments will have a companion lab to help you learn the task and should cover similar

More information

A. Using the data provided above, calculate the sampling variance and standard error for S for each week s data.

A. Using the data provided above, calculate the sampling variance and standard error for S for each week s data. WILD 502 Lab 1 Estimating Survival when Animal Fates are Known Today s lab will give you hands-on experience with estimating survival rates using logistic regression to estimate the parameters in a variety

More information

Multiple Regression White paper

Multiple Regression White paper +44 (0) 333 666 7366 Multiple Regression White paper A tool to determine the impact in analysing the effectiveness of advertising spend. Multiple Regression In order to establish if the advertising mechanisms

More information

STAT 3304/5304 Introduction to Statistical Computing. Introduction to SAS

STAT 3304/5304 Introduction to Statistical Computing. Introduction to SAS STAT 3304/5304 Introduction to Statistical Computing Introduction to SAS What is SAS? SAS (originally an acronym for Statistical Analysis System, now it is not an acronym for anything) is a program designed

More information

Minitab 17 commands Prepared by Jeffrey S. Simonoff

Minitab 17 commands Prepared by Jeffrey S. Simonoff Minitab 17 commands Prepared by Jeffrey S. Simonoff Data entry and manipulation To enter data by hand, click on the Worksheet window, and enter the values in as you would in any spreadsheet. To then save

More information

Spreadsheet and Graphing Exercise Biology 210 Introduction to Research

Spreadsheet and Graphing Exercise Biology 210 Introduction to Research 1 Spreadsheet and Graphing Exercise Biology 210 Introduction to Research There are many good spreadsheet programs for analyzing data. In this class we will use MS Excel. Below are a series of examples

More information

R Commander Tutorial

R Commander Tutorial R Commander Tutorial Introduction R is a powerful, freely available software package that allows analyzing and graphing data. However, for somebody who does not frequently use statistical software packages,

More information

The SAS interface is shown in the following screen shot:

The SAS interface is shown in the following screen shot: The SAS interface is shown in the following screen shot: There are several items of importance shown in the screen shot First there are the usual main menu items, such as File, Edit, etc I seldom use anything

More information

Week 4: Simple Linear Regression III

Week 4: Simple Linear Regression III Week 4: Simple Linear Regression III Marcelo Coca Perraillon University of Colorado Anschutz Medical Campus Health Services Research Methods I HSMP 7607 2017 c 2017 PERRAILLON ARR 1 Outline Goodness of

More information

Using an ICPSR set-up file to create a SAS dataset

Using an ICPSR set-up file to create a SAS dataset Using an ICPSR set-up file to create a SAS dataset Name library and raw data files. From the Start menu, launch SAS, and in the Editor program, write the codes to create and name a folder in the SAS permanent

More information

0 Graphical Analysis Use of Excel

0 Graphical Analysis Use of Excel Lab 0 Graphical Analysis Use of Excel What You Need To Know: This lab is to familiarize you with the graphing ability of excels. You will be plotting data set, curve fitting and using error bars on the

More information

Epidemiology Principles of Biostatistics Chapter 3. Introduction to SAS. John Koval

Epidemiology Principles of Biostatistics Chapter 3. Introduction to SAS. John Koval Epidemiology 9509 Principles of Biostatistics Chapter 3 John Koval Department of Epidemiology and Biostatistics University of Western Ontario What we will do today We will learn to use use SAS to 1. read

More information

Your Name: Section: INTRODUCTION TO STATISTICAL REASONING Computer Lab #4 Scatterplots and Regression

Your Name: Section: INTRODUCTION TO STATISTICAL REASONING Computer Lab #4 Scatterplots and Regression Your Name: Section: 36-201 INTRODUCTION TO STATISTICAL REASONING Computer Lab #4 Scatterplots and Regression Objectives: 1. To learn how to interpret scatterplots. Specifically you will investigate, using

More information

How to Do Everything We Need to Do on a TI Calculator in Algebra 2 for Now (Unless Davies Forgot Something)

How to Do Everything We Need to Do on a TI Calculator in Algebra 2 for Now (Unless Davies Forgot Something) How to Do Everything We Need to Do on a TI Calculator in Algebra 2 for Now (Unless Davies Forgot Something) 10.01.17 Before you do anything, set up your calculator so that it won t get in your way. Basics:

More information

Excel Assignment 4: Correlation and Linear Regression (Office 2016 Version)

Excel Assignment 4: Correlation and Linear Regression (Office 2016 Version) Economics 225, Spring 2018, Yang Zhou Excel Assignment 4: Correlation and Linear Regression (Office 2016 Version) 30 Points Total, Submit via ecampus by 8:00 AM on Tuesday, May 1, 2018 Please read all

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

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

An Introduction to Stata Exercise 1

An Introduction to Stata Exercise 1 An Introduction to Stata Exercise 1 Anna Folke Larsen, September 2016 1 Table of Contents 1 Introduction... 1 2 Initial options... 3 3 Reading a data set from a spreadsheet... 5 4 Descriptive statistics...

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

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

Outline. Topic 16 - Other Remedies. Ridge Regression. Ridge Regression. Ridge Regression. Robust Regression. Regression Trees. Piecewise Linear Model

Outline. Topic 16 - Other Remedies. Ridge Regression. Ridge Regression. Ridge Regression. Robust Regression. Regression Trees. Piecewise Linear Model Topic 16 - Other Remedies Ridge Regression Robust Regression Regression Trees Outline - Fall 2013 Piecewise Linear Model Bootstrapping Topic 16 2 Ridge Regression Modification of least squares that addresses

More information

Welcome to class! Put your Create Your Own Survey into the inbox. Sign into Edgenuity. Begin to work on the NC-Math I material.

Welcome to class! Put your Create Your Own Survey into the inbox. Sign into Edgenuity. Begin to work on the NC-Math I material. Welcome to class! Put your Create Your Own Survey into the inbox. Sign into Edgenuity. Begin to work on the NC-Math I material. Unit Map - Statistics Monday - Frequency Charts and Histograms Tuesday -

More information

A whirlwind introduction to using R for your research

A whirlwind introduction to using R for your research A whirlwind introduction to using R for your research Jeremy Chacón 1 Outline 1. Why use R? 2. The R-Studio work environment 3. The mock experimental analysis: 1. Writing and running code 2. Getting data

More information

Dr. Barbara Morgan Quantitative Methods

Dr. Barbara Morgan Quantitative Methods Dr. Barbara Morgan Quantitative Methods 195.650 Basic Stata This is a brief guide to using the most basic operations in Stata. Stata also has an on-line tutorial. At the initial prompt type tutorial. In

More information

Introduction to gretl

Introduction to gretl Introduction to gretl Applied Economics Department of Economics Universidad Carlos III de Madrid Outline 1 What is gretl? 2 gretl Basics 3 Importing Data 4 Saving as gretl File 5 Running a Script 6 First

More information

Lab 07: Multiple Linear Regression: Variable Selection

Lab 07: Multiple Linear Regression: Variable Selection Lab 07: Multiple Linear Regression: Variable Selection OBJECTIVES 1.Use PROC REG to fit multiple regression models. 2.Learn how to find the best reduced model. 3.Variable diagnostics and influential statistics

More information

BIO 360: Vertebrate Physiology Lab 9: Graphing in Excel. Lab 9: Graphing: how, why, when, and what does it mean? Due 3/26

BIO 360: Vertebrate Physiology Lab 9: Graphing in Excel. Lab 9: Graphing: how, why, when, and what does it mean? Due 3/26 Lab 9: Graphing: how, why, when, and what does it mean? Due 3/26 INTRODUCTION Graphs are one of the most important aspects of data analysis and presentation of your of data. They are visual representations

More information

Barchard Introduction to SPSS Marks

Barchard Introduction to SPSS Marks Barchard Introduction to SPSS 22.0 3 Marks Purpose The purpose of this assignment is to introduce you to SPSS, the most commonly used statistical package in the social sciences. You will create a new data

More information

STA9750 Lecture I OUTLINE 1. WELCOME TO 9750!

STA9750 Lecture I OUTLINE 1. WELCOME TO 9750! STA9750 Lecture I OUTLINE 1. Welcome to STA9750! a. Blackboard b. Tentative syllabus c. Remote access to SAS 2. Introduction to reading data with SAS a. Manual input b. Reading from a text file c. Import

More information

TIPS AND TRICKS: IMPROVE EFFICIENCY TO YOUR SAS PROGRAMMING

TIPS AND TRICKS: IMPROVE EFFICIENCY TO YOUR SAS PROGRAMMING TIPS AND TRICKS: IMPROVE EFFICIENCY TO YOUR SAS PROGRAMMING Guillaume Colley, Lead Data Analyst, BCCFE Page 1 Contents Customized SAS Session Run system options as SAS starts Labels management Shortcut

More information

PART I: USING SAS FOR THE PC AN OVERVIEW 1.0 INTRODUCTION

PART I: USING SAS FOR THE PC AN OVERVIEW 1.0 INTRODUCTION PART I: USING SAS FOR THE PC AN OVERVIEW 1.0 INTRODUCTION The statistical package SAS (Statistical Analysis System) is a large computer program specifically designed to do statistical analyses. It is very

More information

range: [1,20] units: 1 unique values: 20 missing.: 0/20 percentiles: 10% 25% 50% 75% 90%

range: [1,20] units: 1 unique values: 20 missing.: 0/20 percentiles: 10% 25% 50% 75% 90% ------------------ log: \Term 2\Lecture_2s\regression1a.log log type: text opened on: 22 Feb 2008, 03:29:09. cmdlog using " \Term 2\Lecture_2s\regression1a.do" (cmdlog \Term 2\Lecture_2s\regression1a.do

More information

Stat 5100 Handout #14.a SAS: Logistic Regression

Stat 5100 Handout #14.a SAS: Logistic Regression Stat 5100 Handout #14.a SAS: Logistic Regression Example: (Text Table 14.3) Individuals were randomly sampled within two sectors of a city, and checked for presence of disease (here, spread by mosquitoes).

More information

A quick introduction to First Bayes

A quick introduction to First Bayes A quick introduction to First Bayes Lawrence Joseph October 1, 2003 1 Introduction This document very briefly reviews the main features of the First Bayes statistical teaching package. For full details,

More information

Part B. EpiData Analysis

Part B. EpiData Analysis Part B. EpiData Analysis Part B: EpiData Analysis Exercise 1 An introduction to EpiData Analysis Exercise 2 More on EpiData Analysis Exercise 3 Aggregating data and saving the summary data in a file Exercise

More information

You will learn: The structure of the Stata interface How to open files in Stata How to modify variable and value labels How to manipulate variables

You will learn: The structure of the Stata interface How to open files in Stata How to modify variable and value labels How to manipulate variables Jennie Murack You will learn: The structure of the Stata interface How to open files in Stata How to modify variable and value labels How to manipulate variables How to conduct basic descriptive statistics

More information

/23/2004 TA : Jiyoon Kim. Recitation Note 1

/23/2004 TA : Jiyoon Kim. Recitation Note 1 Recitation Note 1 This is intended to walk you through using STATA in an Athena environment. The computer room of political science dept. has STATA on PC machines. But, knowing how to use it on Athena

More information

Intermediate SAS: Working with Data

Intermediate SAS: Working with Data Intermediate SAS: Working with Data OIT Technical Support Services 293-4444 oithelp@mail.wvu.edu oit.wvu.edu/training/classmat/sas/ Table of Contents Getting set up for the Intermediate SAS workshop:...

More information

General Guidelines: SAS Analyst

General Guidelines: SAS Analyst General Guidelines: SAS Analyst The Analyst application is a data analysis tool in SAS for Windows (version 7 and later) that provides easy access to basic statistical analyses using a point-and-click

More information

= 3 + (5*4) + (1/2)*(4/2)^2.

= 3 + (5*4) + (1/2)*(4/2)^2. Physics 100 Lab 1: Use of a Spreadsheet to Analyze Data by Kenneth Hahn and Michael Goggin In this lab you will learn how to enter data into a spreadsheet and to manipulate the data in meaningful ways.

More information

Introduction to Stata. Written by Yi-Chi Chen

Introduction to Stata. Written by Yi-Chi Chen Introduction to Stata Written by Yi-Chi Chen Center for Social Science Computation & Research 145 Savery Hall University of Washington Seattle, WA 98195 U.S.A (206)543-8110 September 2002 http://julius.csscr.washington.edu/pdf/stata.pdf

More information

Intro to Stata for Political Scientists

Intro to Stata for Political Scientists Intro to Stata for Political Scientists Andrew S. Rosenberg Junior PRISM Fellow Department of Political Science Workshop Description This is an Introduction to Stata I will assume little/no prior knowledge

More information

Introduction to Minitab 1

Introduction to Minitab 1 Introduction to Minitab 1 We begin by first starting Minitab. You may choose to either 1. click on the Minitab icon in the corner of your screen 2. go to the lower left and hit Start, then from All Programs,

More information

Data-Analysis Exercise Fitting and Extending the Discrete-Time Survival Analysis Model (ALDA, Chapters 11 & 12, pp )

Data-Analysis Exercise Fitting and Extending the Discrete-Time Survival Analysis Model (ALDA, Chapters 11 & 12, pp ) Applied Longitudinal Data Analysis Page 1 Data-Analysis Exercise Fitting and Extending the Discrete-Time Survival Analysis Model (ALDA, Chapters 11 & 12, pp. 357-467) Purpose of the Exercise This data-analytic

More information

STATA Tutorial. Introduction to Econometrics. by James H. Stock and Mark W. Watson. to Accompany

STATA Tutorial. Introduction to Econometrics. by James H. Stock and Mark W. Watson. to Accompany STATA Tutorial to Accompany Introduction to Econometrics by James H. Stock and Mark W. Watson STATA Tutorial to accompany Stock/Watson Introduction to Econometrics Copyright 2003 Pearson Education Inc.

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

StatLab Workshops 2008

StatLab Workshops 2008 Stata Workshop Fall 2008 Adrian de la Garza and Nancy Hite Using STATA at the Statlab 1. The Different Windows in STATA Automatically displayed windows o Command Window: executes STATA commands; type in

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

1. Setup Everyone: Mount the /geobase/geo5215 drive and add a new Lab4 folder in you Labs directory.

1. Setup Everyone: Mount the /geobase/geo5215 drive and add a new Lab4 folder in you Labs directory. L A B 4 E X C E L For this lab, you will practice importing datasets into an Excel worksheet using different types of formatting. First, you will import data that is nicely organized at the source. Then

More information

Problem set for Week 7 Linear models: Linear regression, multiple linear regression, ANOVA, ANCOVA

Problem set for Week 7 Linear models: Linear regression, multiple linear regression, ANOVA, ANCOVA ECL 290 Statistical Models in Ecology using R Problem set for Week 7 Linear models: Linear regression, multiple linear regression, ANOVA, ANCOVA Datasets in this problem set adapted from those provided

More information

Our Changing Forests Level 2 Graphing Exercises (Google Sheets)

Our Changing Forests Level 2 Graphing Exercises (Google Sheets) Our Changing Forests Level 2 Graphing Exercises (Google Sheets) In these graphing exercises, you will learn how to use Google Sheets to create a simple pie chart to display the species composition of your

More information

AMS Lab # 1. Prof. Wei Zhu

AMS Lab # 1. Prof. Wei Zhu AMS 394.1 Lab # 1. Prof. Wei Zhu Aim: oday we will learn how to input data from the keyboard in SAS and also the SAS Proc Univariate Procedure. We will also learn how to download R from the internet. Note

More information

A First Tutorial in Stata

A First Tutorial in Stata A First Tutorial in Stata Stan Hurn Queensland University of Technology National Centre for Econometric Research www.ncer.edu.au Stan Hurn (NCER) Stata Tutorial 1 / 66 Table of contents 1 Preliminaries

More information

Chapter One: Getting Started With IBM SPSS for Windows

Chapter One: Getting Started With IBM SPSS for Windows Chapter One: Getting Started With IBM SPSS for Windows Using Windows The Windows start-up screen should look something like Figure 1-1. Several standard desktop icons will always appear on start up. Note

More information

Error Analysis, Statistics and Graphing

Error Analysis, Statistics and Graphing Error Analysis, Statistics and Graphing This semester, most of labs we require us to calculate a numerical answer based on the data we obtain. A hard question to answer in most cases is how good is your

More information

Barchard Introduction to SPSS Marks

Barchard Introduction to SPSS Marks Barchard Introduction to SPSS 21.0 3 Marks Purpose The purpose of this assignment is to introduce you to SPSS, the most commonly used statistical package in the social sciences. You will create a new data

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

A Guided Tour Through the SAS Windowing Environment Casey Cantrell, Clarion Consulting, Los Angeles, CA

A Guided Tour Through the SAS Windowing Environment Casey Cantrell, Clarion Consulting, Los Angeles, CA A Guided Tour Through the SAS Windowing Environment Casey Cantrell, Clarion Consulting, Los Angeles, CA ABSTRACT The SAS system running in the Microsoft Windows environment contains a multitude of tools

More information

INTRODUCTION SAS Prepared by A. B. Billings West Virginia University May 1999 (updated August 2006)

INTRODUCTION SAS Prepared by A. B. Billings West Virginia University May 1999 (updated August 2006) INTRODUCTION To SAS Prepared by A. B. Billings West Virginia University May 1999 (updated August 2006) 1 Getting Started with SAS SAS stands for Statistical Analysis System. SAS is a computer software

More information

Finance Data: Datastream. An Introduction Guide. Table Of Content. 1. Introduction When do I use Datastream 2

Finance Data: Datastream. An Introduction Guide. Table Of Content. 1. Introduction When do I use Datastream 2 Finance Data: Datastream An Introduction Guide Table Of Content 1. Introduction 2 1.1 When do I use Datastream 2 2. Getting started: Open up Excel with Datastream 2 2.1 Import simple time-series data 3

More information

Agenda. - Final Project Info. - All things Git. - Make sure to come to lab for Python next week

Agenda. - Final Project Info. - All things Git. - Make sure to come to lab for Python next week Lab #8 Git Agenda - Final Project Info - All things Git - Make sure to come to lab for Python next week Final Project Low Down The Projects are Creative AI, Arduino, Web Scheduler, ios and Connect 4 Notes

More information

CS106 Lab 1: Getting started with Python, Linux, and Canopy. A. Using the interpreter as a fancy calculator

CS106 Lab 1: Getting started with Python, Linux, and Canopy. A. Using the interpreter as a fancy calculator CS106 Lab 1: Getting started with Python, Linux, and Canopy Dr. Victor Norman Goals: To learn How python can be used interactively for simple computational tasks. How to run Canopy Start playing with Turtle

More information

Enterprise Miner Version 4.0. Changes and Enhancements

Enterprise Miner Version 4.0. Changes and Enhancements Enterprise Miner Version 4.0 Changes and Enhancements Table of Contents General Information.................................................................. 1 Upgrading Previous Version Enterprise Miner

More information

5. Key ingredients for programming a random walk

5. Key ingredients for programming a random walk 1. Random Walk = Brownian Motion = Markov Chain (with caveat that each of these is a class of different models, not all of which are exactly equal) 2. A random walk is a specific kind of time series process

More information

Stat 500 lab notes c Philip M. Dixon, Week 10: Autocorrelated errors

Stat 500 lab notes c Philip M. Dixon, Week 10: Autocorrelated errors Week 10: Autocorrelated errors This week, I have done one possible analysis and provided lots of output for you to consider. Case study: predicting body fat Body fat is an important health measure, but

More information

Intermediate SAS: Statistics

Intermediate SAS: Statistics Intermediate SAS: Statistics OIT TSS 293-4444 oithelp@mail.wvu.edu oit.wvu.edu/training/classmat/sas/ Table of Contents Procedures... 2 Two-sample t-test:... 2 Paired differences t-test:... 2 Chi Square

More information