SAS OnDemand for Academics
registration and basic using
Lecturer: Supanon Tunim (Ph.D.)
Animal Production Innovation and Management Division
Faculty of Natural Resources, Prince of Songkla University
ANOVA (Analysis of variance)
GLM (Generalized Linear Model)
CORR (Correlation)
REG (Regression)
MIXED (Mixed Model)
CODE: input code and data lines and procedure command
LOG: check-up an error or any mistake from code
RESULT: display output with some additional graphic
Input step: notice the SAS program to know name and
type of variable and operation data also.
Data lines step:DATA; adding data following input variable
INPUT ID SEX $ TRT ADG;
OUTPUT;
DATALINES;
1 F 1 8.5
2 M 1 7.9
3 F 2 5.4
4 M 2 5.6
5 F 3 5.8
6 M 3 5.6
Proc step:; adding command for analysis variable
PROC ANOVA;
CLASS SEX TRT;
according to objectiveMODEL ADG = SEX TRT;
MEANS TRT / DUNCAN;
RUN;
DATA;
INPUT ID SEX $ TRT ADG;
OUTPUT;
DATALINES;
1 F 1 8.5
2 M 1 7.9
3 F 2 5.4
4 M 2 5.6
5 F 3 5.8
6 M 3 5.6
;
PROC ANOVA;
CLASS SEX TRT;
MODEL ADG = SEX TRT;
MEANS TRT / DUNCAN;
RUN;