SAS learn the basic concepts of notes ①

Internship, CRO and pharmaceutical companies, are required to SAS, a word, learn!

 

SAS program comprises two parts, a data  and proc

SAS SAS program must be based on a keyword (keyword) at the beginning, usually end with a semicolon (semicolon), case-insensitive, you can write multiple lines

RUN write a lot of advantages, easy to read and debug

Each execution SAS generates a log, log processing and including processing results and error

File storage format libref.filename, an intermediate period (period)

Built-in logic library name: work

Connecting a fixed logic library libname test 'C: \ sas';

The name of the data set: letters or begin with an underscore, 1-32 characters

In general, SAS data set includes description section (descriptor portion) and a data portion (data portion)

A behavior of an observation unit (observation), a listed as a variable (variable)

Properties of the variable (variable attributes) include the name of name, type of type, the length of the length, format format, informat, tag label

There are character and numeric type

character missing values ​​(NA) of the blank (blank), numeric values ​​deletion period (period)

character accounted for the largest 32,767 bytes, numeric default 8 bytes (default length)

There format character, numeric, time, date, format variables can affect the way the value written. You can also customize the format

Two significant figures: for example 2 becomes 2.00, format is COMMA8.2 denotes the width (width) is 8, two decimal places (2 decimal places)

In the SAS data set, the variable setting permanent format. Temporary variables in the proc

When mixed with the character number, eg: $ 1,000.00, informat will enter the value read in a standard format

label a variable name as a label as you wish

 

Guess you like

Origin www.cnblogs.com/super-yb/p/10972569.html