review - Stat480 TheFirstHalfReview In 20 minutes or less...

Info icon This preview shows pages 1–13. Sign up to view the full content.

View Full Document Right Arrow Icon
Stat 480 The First Half Review In 20 minutes or less…. March 2 nd , 2010 10:10 – 11:00 am
Image of page 1

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

View Full Document Right Arrow Icon
Today’s Outline Import Visualize Analyze Other
Image of page 2
Importing Data Data Statement
Image of page 3

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

View Full Document Right Arrow Icon
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!
Image of page 4
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 ;
Image of page 5

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

View Full Document Right Arrow Icon
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
Image of page 6
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 ;
Image of page 7

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

View Full Document Right Arrow Icon
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)
Image of page 8
Libname statement libname dowJones "F:\Data\Finance\DJIA\" ; libname <Library Name> <Library Path> ; Data Source: Permanent SAS Dataset
Image of page 9

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

View Full Document Right Arrow Icon
/* Data Libraries */ libname stat200 "F:\Data\Tutorial Examples\Stat 200\" ; Proc Freq data =stat200.complete; var gender; run ; Data Source: Permanent SAS Dataset
Image of page 10
Advantages Always use the same data Minimize coding errors Quick & Easy Can send .sas7bdat file. No more infile or input statements Disadvantages Setup takes an extra minute. Proc Freq data =stat200.complete; var gender; run ; Data Source: Permanent SAS Dataset
Image of page 11

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

View Full Document Right Arrow Icon
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
Image of page 12
Image of page 13
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern