EDP 556
Main
| Class Summary
| Mid
Term Program & Output | Student-generated
Problem Sets | Statistical
Resources
Mid Term Objectives
Category 1: Move data around the Internet
-
Telnet to stats.asu.edu (host computer)
-
<ftp> open
-
(to) psych.ed.asu.edu
-
password: guest
-
> ls
-
> get file name
-
> bye
Category 2: General info re programming for large datasets
1.
2. Syntax error example: INPUT age gender id
PROC means;
error at end of first line: SAS will read proc and means
as variables because the semicolon after id is missing
Semantical error: Is SAS doing what you want?
Keep log or documentation.
Category 3: Getting data into a SAS dataset
ex. Data exam;
Infile 'exam.acs.txt';
Input @12 test @;
if test = 1 then
input emp_id 1-3
height 4-5
weight 6-8;
else if test = 2 then
input emp-Id 1-3
height 5-6
weight 8-10;
run;
INFILE
INFORMAT
INPUT
Category 4: Creating new datafiles
SET, MERGE (combo), UPDATE (new version) - reading and combining Data
sets
IN
LIBNAME
subsetting IF (IF not condition then delete)
WHERE (alternative IF)
DROP (63-65)
KEEP (63-65)
Category 5: Recoding and functions
IF/THEN-ELSE p. 50
SELECT
53
PROC FORMAT 54 (also Ch 11)
PUT FUNCTION 56 (char_var=PUT (arg_var,
any_fmt.);
ex. Grade=PUT (Score, Scorefmt.);
ARRAY (135-145 note: 5.4)
FUNCTIONS (99-114)
Category 6: Basic procs
PROC PRINT
VAR
PROC MEANS