Download presentation
Presentation is loading. Please wait.
1
ECO 5520 Lab Session
2
Tasks Turn on Computer and Find SAS Learn how to Open Data
Learn how to Specify Work Learn how to Save Output
3
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
4
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
6
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.
7
Meanwhile Look at codebook. There are hundreds of variables.
They relate to House variables Neighborhood variables School variables Public safety variables Tax variables
8
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.
9
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.
10
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.
11
Output
12
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.
13
Correlation Correlation Variable lotsize brick agehouse tranamt
Cincinn Cleveland Columbus Dayton Toledo Ytown 1.0000 0.1598 0.0103 0.0147 0.1798 0.2409 0.0745 0.1358 0.1108 0.0374 0.0876 0.0432 0.0426 0.0259 0.0869
14
Regressions What does this say?
15
What does this say? Is it better or worse? Why?
16
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
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.