1 OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;7273 /* mvtubes.sas */7475 title 'Multivariate tests on Little Fungus Tube data';7677 data mould;78 infile '/folders/myfolders/441s18/Lecture/littletubes.data.txt' firstobs=2;79 input tube mcg length10 weight;80 /* Make dummy variables using arrays */81 /* v1-v6 will have these values for every case. */82 v1=198; v2=205; v3=213; v4=221; v5=223; v6=225;83 array dummy{6} mcg198 mcg205 mcg213 mcg221 mcg223 mcg225;84 array value{6} v1-v6;85 do j = 1 to 6;86 if mcg = . then dummy{j} = .;87 else if mcg = value{j} then dummy{j}=1;88 else dummy{j}=0;89 end;90 /* Effect coding */91 array fungus{5} fungus1-fungus5;92 do i = 1 to 5;93 if mcg=225 then fungus{i} = -1;94 else fungus{i}=dummy{i};95 end;9697NOTE: The infile '/folders/myfolders/441s18/Lecture/littletubes.data.txt' is:Filename=/folders/myfolders/441s18/Lecture/littletubes.data.txt,Owner Name=root,Group Name=vboxsf,Access Permission=-rwxrwx---,Last Modified=05Mar2018:15:51:48,File Size (bytes)=1425NOTE: 24 records were read from the infile '/folders/myfolders/441s18/Lecture/littletubes.data.txt'.The minimum record length was 55.The maximum record length was 55.NOTE: The data set WORK.MOULD has 24 observations and 23 variables.NOTE: DATA statement used (Total process time):real time 0.00 secondscpu time 0.01 seconds98 proc freq;99 title2 'Check dummy variable creation';100 tables (mcg198--mcg225)*mcg / norow nocol nopercent missing;101NOTE: There were 24 observations read from the data set WORK.MOULD.NOTE: PROCEDURE FREQ used (Total process time):real time 0.15 secondscpu time 0.15 seconds102 proc glm;103 title2 'Manova with proc glm';104 class mcg;105 model length10 weight = mcg;106 /* Test equality of mcgs excluding 198: a COLLECTION of contrasts */107 contrast 'AllBut198' mcg 0 1 -1 0 0 0,108 mcg 0 0 1 -1 0 0,109 mcg 0 0 0 1 -1 0,110 mcg 0 0 0 0 1 -1;111 manova H = _all_;112NOTE: PROCEDURE GLM used (Total process time):real time 1.06 secondscpu time 0.36 seconds113 proc reg plots=none;114 title2 'Manova with proc reg and effect coding;';115 model length10 weight = fungus1-fungus5;116 overall: mtest fungus1=fungus2=fungus3=fungus4=fungus5=0;117NOTE: PROCEDURE REG used (Total process time):real time 0.12 secondscpu time 0.11 seconds118 proc reg plots=none;119 title2 'Manova with proc reg and cell means coding';120 model length10 weight = mcg198 mcg205 mcg213 mcg221 mcg223 mcg225 / noint;121 Overall: test mcg198=mcg205=mcg213=mcg221=mcg223=mcg225;122 mOverall: mtest mcg198=mcg205=mcg213=mcg221=mcg223=mcg225;123 AllBut198: test mcg205=mcg213=mcg221=mcg223=mcg225;124 mAllBut198: mtest mcg205=mcg213=mcg221=mcg223=mcg225;125126127128129130 OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;143