/******************** ClassicalNoise.sas ************************** * Participants listened to political discussions under different * * levels of background noise. "Discrimination score" is a measure * * of how well they could tell what was being said. * ******************************************************************/ title 'Noise data'; proc format; value sexfmt 0 = 'Male' 1 = 'Female' ; data loud; infile '/folders/myfolders/noise.data.txt'; /* Univariate data read */ input ident interest sex age noise time discrim ; format sex sexfmt.; label interest = 'Interest in topic (politics)' time = 'Order of presenting noise level'; proc freq; tables sex*age*noise / norow nocol nopercent; proc glm; title2 'Classical mixed model repeated measures'; class ident age sex noise; model discrim = age|sex|noise ident(age*sex); random ident(age*sex) / test; means noise age; /* Expected mean squares show that not all the hypotheses are testable with the classical mixed model approach. SAS is buying testability of the hypotheses by assuming that you're only interested in an effect if all the higher-order interactions involving that effect are absent. Also, we can't use the covariate and it's not clear how to do multiple comparisons. */