Review - Stat 480 The First Half Review In 20 minutes or less… March 2 nd 2010 10:10 – 11:00 am Today’s Outline Import Visualize Analyze

Info iconThis preview shows pages 1–12. Sign up to view the full content.

View Full Document Right Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: Stat 480 The First Half Review In 20 minutes or less…. March 2 nd , 2010 10:10 – 11:00 am Today’s Outline Import Visualize Analyze Other Importing Data Data Statement Data Procedure Source Embedded Dataset File (Text file, CSV, etc.) SAS Permanent Data File Contents Input Statement Recoding & Creating Variables Creating a Subset Merging Two Datasets Drop, Keep, & Rename Next Class! Data Source: Embedded Datasets /* Stat 480 Data */ Data stat480Data; Input gender computeComfort usedMinitab usedSPSS usedSAS usedR usedAMOS usedSTATA exPref $ sasComfort; datalines ; 1 2 1 0 0 0 0 0 Finance 1 2 4 1 0 0 0 0 0 SocialScience 1 1 4 1 0 0 0 0 0 Agricultural 1 1 4 1 0 0 0 0 0 Finance 1 1 3 1 0 0 0 0 0 Finance 1 1 3 1 0 0 0 0 0 Finance 1 1 4 1 0 0 0 0 0 Finance 1 1 4 1 0 0 1 0 0 Finance 1 2 3 1 0 0 0 0 1 Finance 1 2 5 1 0 1 1 0 0 Engineering 2 2 4 1 0 1 0 0 0 Agricultural 2 2 4 1 0 0 1 0 0 SocialScience 1 1 5 1 1 0 0 0 0 Finance 1 1 2 1 0 0 0 0 0 SocialScience 1 ; run ; Often most useful for short datasets Advantages You can see the data! Easy to tweak the formatting of the input statement. Preliminary setup for large dataset Disadvantages Syntax file is longer /* Stat 480 Data */ Data stat480Data; Input gender computeComfort usedMinitab usedSPSS usedSAS usedR usedAMOS usedSTATA exPref $ sasComfort; datalines ; 1 2 1 0 0 0 0 0 Finance 1 2 4 1 0 0 0 0 0 SocialScience 1 1 4 1 0 0 0 0 0 Agricultural 1 1 4 1 0 0 0 0 0 Finance 1 ; run ; Data Source: Embedded Datasets Data Source: File ( Text, CSV, etc) Data stat200Data; Infile "Stat 200.txt" firstobs = 2 ; Input gender homeTwn $ greek gpa skipCl sitArea $ handed $ hrsExer smokeCig fastDrvn drvnInfl hsSports virgin cheatdSO sexPartns ageLostIt; run ; Advantages Accommodates large datasets One line syntax Several supported formats Disadvantages Harder to determine what went wrong SAS doesn’t like network drives. Must have data file also (isn’t embedded with syntax). /* Stat 480 Data */ Data stat200Data; Infile "Stat 200.txt" firstobs = 2 ; Input gender homeTwn $ greek gpa skipCl sitArea $ handed $ hrsExer smokeCig fastDrvn drvnInfl hsSports virgin cheatdSO sexPartns ageLostIt; run ; Data Source: File ( Text, CSV, etc) Libname statement libname dowJones "F:\Data\Finance\DJIA\" ; libname <Library Name> <Library Path> ; Data Source: Permanent SAS Dataset /* Data Libraries */ libname stat200 "F:\Data\Tutorial Examples\Stat 200\" ; Proc Freq data =stat200.complete; var gender; run ; Data Source: Permanent SAS Dataset Advantages Always use the same data Minimize coding errors Quick & Easy Can send .sas7bdat file....
View Full Document

This note was uploaded on 01/27/2011 for the course STAT 480 taught by Professor Staff during the Spring '08 term at Pennsylvania State University, University Park.

Page1 / 60

Review - Stat 480 The First Half Review In 20 minutes or less… March 2 nd 2010 10:10 – 11:00 am Today’s Outline Import Visualize Analyze

This preview shows document pages 1 - 12. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online