1 OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;5556 /* SleepTheHardWay.sas */57 title "Student's Sleep data with a classical mixed model";5859 data bedtime;60 infile '/folders/myfolders/studentsleep.data.txt' firstobs=2;61 /* Skip the header */62 input patient xsleep1 xsleep2;63 sleepdif = xsleep2-xsleep1;64NOTE: The infile '/folders/myfolders/studentsleep.data.txt' is:Filename=/folders/myfolders/studentsleep.data.txt,Owner Name=root,Group Name=vboxsf,Access Permission=-rwxrwx---,Last Modified=05Jan2016:14:26:25,File Size (bytes)=544NOTE: 10 records were read from the infile '/folders/myfolders/studentsleep.data.txt'.The minimum record length was 47.The maximum record length was 47.NOTE: The data set WORK.BEDTIME has 10 observations and 4 variables.NOTE: DATA statement used (Total process time):real time 0.01 secondscpu time 0.00 seconds65 proc print;66 title2 'Data in multivariate format';67NOTE: There were 10 observations read from the data set WORK.BEDTIME.NOTE: PROCEDURE PRINT used (Total process time):real time 0.04 secondscpu time 0.05 seconds68 proc means n mean stddev t probt;69 title2 'Matched t-test';70 var xsleep1 xsleep2 sleepdif;7172 /* Make a data table in univariate format */73NOTE: There were 10 observations read from the data set WORK.BEDTIME.NOTE: PROCEDURE MEANS used (Total process time):real time 0.04 secondscpu time 0.03 seconds74 data unisleep;75 set bedtime; /* output writes a case */76 Subject=patient; Drug=1; ExtraSleep=xsleep1; output;77 Subject=patient; Drug=2; ExtraSleep=xsleep2; output;78 keep Subject Drug ExtraSleep;79NOTE: There were 10 observations read from the data set WORK.BEDTIME.NOTE: The data set WORK.UNISLEEP has 20 observations and 3 variables.NOTE: DATA statement used (Total process time):real time 0.00 secondscpu time 0.01 seconds80 proc print;81 title2 'Data in univariate format';82NOTE: There were 20 observations read from the data set WORK.UNISLEEP.NOTE: PROCEDURE PRINT used (Total process time):real time 0.03 secondscpu time 0.03 seconds83 proc glm plots=none;84 title2 'Repeated measures ANOVA: Compare t = 4.06, p = 0.0028';85 class Subject Drug;86 model ExtraSleep = Subject Drug;87 random Subject / test;8889 /* So F = t-squared except for rounding error. */90919293 OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;105