ECO 5520 Lab Session.

Slides:



Advertisements
Similar presentations
Today: Run SAS programs on Saturn (UNIX tutorial) Runs SAS programs on the PC.
Advertisements

Multiple regression analysis
Plots, Correlations, and Regression Getting a feel for the data using plots, then analyzing the data with correlations and linear regression.
Anya Brookman. How to create a new message Unwanted messages Folders Messages you have sent to someone Logging out when you have finished sending.
Introduction to SAS BIO 226 – Spring Outline Windows and common rules Getting the data –The PRINT and CONTENT Procedures Manipulating the data.
Matlab Basics Tutorial. Vectors Let's start off by creating something simple, like a vector. Enter each element of the vector (separated by a space) between.
1 Back Up with Each Submit One approach for keeping a dynamic back up copy of your current work.
Regression in SAS Caitlin Phelps. Importing Data  Proc Import:  Read in variables in data set  May need some options incase SAS doesn’t guess the format.
Lesson 6 - Topics Reading SAS datasets Subsetting SAS datasets Merging SAS datasets.
BMTRY 789 Lecture 10: SAS MACRO Facility Annie N. Simpson, MSc.
Multiple Imputation using SAS Don Miller 812 Oswald Tower
Term Paper – 2015 ECO 5520/5930/6520/Honors It’s early, but … Several have asked. Deliverable is due Monday, March 30. Paper is due Wednesday, April.
9NL Ayomi Hasenclever.  You cant touch a software  It is stored in a computer or laptop  Allows the hardware to do something useful, without the software.
ArcGIS Data Management. Data in the Clusters When you log in almost all of the computers on campus your personal profile is installed from a SU server.
Week 2 - Wednesday CS 121.
Thinking Like a Scientist
What is the Scientific Method?
Department of Computer Engineering
Tools for Collaboration and Learning
Introduction to Python
The secret to Success in the tech lab
Formatting Output.
Discussion 2: More to discuss
QM222 Class 13 Section D1 Omitted variable bias (Chapter 13.)
Programming 101 Programming for non-programmers.
Rounding numbers to any thousand place value
Two “identical” programs
Phrases For Business English
Lab: ssh, scp, gdb, valgrind
How to Import an Excel File
Chapter 18: Modifying SAS Data Sets and Tracking Changes
IPC144 Introduction to Programming Using C Week 1 – Lesson 2
Finding work experience can be a tricky business
File Handling Programming Guides.
Week 1 Computer Programming Year 9 – Unit 9.04
Number and String Operations
6-1 Introduction To Empirical Models
Language Basics.
Everything you need to know
Using Statistical techniques in Geography
Items, Group Boxes, Check Boxes & Radio Buttons
Functions In Matlab.
Defining and Calling a Macro
Loops CIS 40 – Introduction to Programming in Python
Lesson 3 Data Storage.
Task 1 Computer Programming LEVEL 6 PROGRAMMING:
Introduction to TouchDevelop
If you go to the party, you’ll have a great time!
Type=Corr SAS.
Python programming exercise
Use of PROC TABULATE Out File to Customize Tables
Stata Basic Course Lab 2.
INTERNET SAFETY RULES! INTERNET SAFETY WEEK!!!.
Tonga Institute of Higher Education IT 141: Information Systems
Multiple Linear Regression
Tonga Institute of Higher Education IT 141: Information Systems
SE1H421 Procedural Programming LECTURE 2 Variables (1)
Running a Java Program using Blue Jay.
Matlab Basics Tutorial
creating a ecosystems model in net logo
Introduction to Python
The Dewey Decimal System
Software Development Techniques
Templates Create and Use
Hans Baumgartner Penn State University
Software Engineering Lab Session
Starter Look at the hand-out.
Week 1 - Friday COMP 1600.
Presentation transcript:

ECO 5520 Lab Session

Tasks Turn on Computer and Find SAS Learn how to Open Data Learn how to Specify Work Learn how to Save Output

If you want the files Create a special folder on your flash drive. Copy in three files 2000data1.csv datatemplate-class.sas variable codesheet.doc

This is where the database is. You simply have to write in in the appropriate Way. Data files data one; *written 3/23/04 after monumental effort starting July, 2002; * rewritten 12/8/04 after correcting hlat, hlong & adding varbs; * rewritten again 1/30/06 after adding private school varbs; * rewritten again 3/13/06 after adding newcomer varbs; infile 'c:\1word\State+Local\brasington\2000data1.csv' dlm=',' lrecl=3000; input j irn pticode loccode msa houselat houselong Oricode

Let it Run The data will process for a while. If it is instantaneous, you’ve probably made a mistake … like You didn’t finish the command. You MUST finish all commands with a semi-colon.

Meanwhile Look at codebook. There are hundreds of variables. They relate to House variables Neighborhood variables School variables Public safety variables Tax variables

BUT We don’t know about the residents. We don’t have residents’ incomes, races, or anything like that. SO, you can’t really do things like estimate consumer demand.

After it runs type in the following Takes log of Transaction rice. data bigcity; set one; ltrans=log(tranamt); if msa = 1 then Akron = 1; else Akron = 0; if msa = 2 then Cincinn = 1; else Cincinn = 0; if msa = 3 then Cleveland = 1; else Cleveland = 0; if msa = 4 then Columbus = 1; else Columbus = 0; If msa = 5 then Dayton = 1; else Dayton = 0; if msa = 6 then Toledo = 1; else Toledo = 0; if msa = 7 then Ytown = 1; else Ytown= 0; if msa = 0 then delete; run; Keeps data in these 7 metro areas.

Must end statements with a semi-colon. Specifies certain Variables. Rest are variable names. MUST Be typed exactly. Look at your data proc means; var tranamt bedrooms agehouse buildingsqft brick pctblack_cbg effmills_sd msa Akron Cincinn Cleveland Columbus Dayton Toledo Ytown; run; Must end statements with a semi-colon.

Output

A couple of regressions Put in, if you want a correlation Matrix. Leave out if you don’t. proc reg corr; model tranamt = lotsize brick agehouse; model tranamt = lotsize brick agehouse Cincinn Cleveland Columbus Dayton Toledo Ytown; run; Don’t worry about intercept. SAS always puts it in.

Correlation Correlation Variable lotsize brick agehouse tranamt Cincinn Cleveland Columbus Dayton Toledo Ytown 1.0000 -0.0059 -0.0372 0.1598 0.0103 -0.0010 -0.0016 -0.0048 -0.0150 0.0147 -0.1912 0.1798 0.2409 -0.2125 0.0745 0.1358 -0.0816 -0.0556 -0.3572 -0.0391 0.1108 -0.1921 0.0374 0.0876 0.0432 0.0426 0.0259 0.0869 -0.0822 -0.0626 -0.0968 -0.2900 -0.2844 -0.1698 -0.1478 -0.1079 -0.3186 -0.1901 -0.1655 -0.1208 -0.1865 -0.1623 -0.1185 -0.0969 -0.0707 -0.0616

Regressions What does this say?

What does this say? Is it better or worse? Why?

Lots to assimilate Try doing this some time in the next week or so. Understand what “hypothesis testing” is. H0 – No effect – NULL HYPOTHESIS H1 – Positive (or negative) effect