Please enable JavaScript.
Coggle requires JavaScript to display documents.
SAS - Coggle Diagram
SAS
PROC
FORMAT <options>
- options: LIBRARY= ... FMTLIB
- **PROC FORMAT
value format name
END**
- Assign format by: varname formatname.
Storing Format
Permanently
- specify LIBNAME
- PROC FORMAT LIBRARY=<name>
-
-
CONTENTS
- data=libname._all_ "nods;
- data= libname.dataset (desc info)
- data= libname.dataset varnum (var. name by creation order)
IMPORT
- datafile= filename (from FILENAME statement)
Relate TASKS to PROC
-
-
Read and write to SAS dataset
Processing DATASET
-
-
Using SAS Function
-
-
Modifying Numeric Values
-
-
-
ROUND
- ROUND(6246.34, 1) = 6246.00
- ROUND(6246.34, 0.1) = 6246.30
- ROUND(6246.34, 0.02) = 6246.34
-
-
Descriptive Stats
Continuous variables
-
Specifying Variables
....................................
PROC MEANS data = cert.survey mean stderr maxdec=2;
var age height weight; // or, var item1-item5;
END
Group Processing
..................................
PROC MEANS DATA = cert.heart maxdec = 1;
VAR arterial heart cardiac;
CLASS survive sex;
run;
..................................
PROC SORT ....OUT = Y;
PROC MEANS DATA= Y maxdec = ;
VAR arterial heart cardiac;
BY survive sex;
RUN;
Categorical Variables
PROC FREQ DATA =... <options>
............................................................
Specifying variables
^^^^^^^^^^^^^^^^^^^^^^
PROC FREQ DATA =cert.diabetes;
TABLES sex; or, TABLES sex NOCUM;
RUN;*
-
-
N-way Table (series of two-way tables)
.....................
PROC FREQ DATA = ...;
**TABLES var1''var2''var3; // TABLES var1''var2''var3 /LIST or, CROSSLIST/ NOFREQ NOPERCENT NOROW NOCOL**
RUN;
SAS STATEMENTS
-
FILENAME
- filename 'path to delimited fiel'
SAS FUNCTIONS
INPUT
- input(2115233, 7.)
- input(2,115,233, comma9.)
-