Instructions for SAS



Reading the Data

data smiles;
infile in sfdialog;
input cond $ leniency;
run;

Descriptive statistics
proc sort; by condition;
proc univariate plot;
by cond;

Inferential statistics;
proc glm data =smiles;
classes cond;
*cond is a categorical variable;

model leniency=cond;
* leniency is the dependent variable, cond is the independent variable;

means cond/dunnett('neutral');
*compute Dunnett's test;

contrast 'smiling versus control' cond 1 1 1 -3;
*Test the contrast coefficients. Note the coefficients apply to the conditions in alphabetical order (false, felt, miserable, neutral) so the coefficient 3 applys to neutral.;


*Test differences among smile conditions;
contrast 'false versus felt' cond 1 -1 0 0;
contrast 'false versus miserable' cond 1 0 -1 0;
contrast 'felt versus miserable' cond 0 1 -1 0;
run;