USING SAS on Unix in CC2 FOR CONFOUNDED AND ALIASED DESIGNS sta5205 Hoffman 4/9/03 - To Login o wiggle the mouse till a window appears o it will be 1 of 2 windows. If “Welcome to...” then type in your username and password If “Select a server...” then click on options and return-to-logon o On boot up it may ask which choice of Desktop you want; select CDE o Windows will now open; including a director tool bar at the bottom and a file manager. You may want to use the file manager to create a new file/directory called sas at this time if you have not done this yet. o To logout, click on the right button in a blank area of the screen and select logout - Usage Hints o click windows square to enlarge;on a windows dot-inside- square to hide;on the arrow for options o click on the director toolbar at the bottom to see available programs - Get to the Web o click on the tools drawer in the director toolbar at the bottom (4th arrow from left) o click on Desktop Apps and scroll down o click on web browser & enter our class website in the blank box by typing http://pegasus.cc.ucf.edu/~hoffman/sta5205.html o we will be copying the ‘Lab4 -- confounding’ and ‘Start on your data’ programs from this site. - Opening SAS o click on the tools drawer & the Desktop & on Terminal o enter ‘telnet olympus’ and re-login then enter ‘sas’ at the > prompt and wait - Using SAS o you can type code into the editor window or copy it in. o copy code: click on the Lab 4 -- confounding on web browser and on the top toolbar click Edit-Select All-Copy o return to SAS editor: click in that window to activate it and then click on the top toolbar on Edit-Paste text o to alter our copied program note that a ‘d’ on the line number and (hit enter key) deletes a line; an ‘i’ inserts one. you may type on new lines as usual o to execute the SAS code, click on Run-Submit; pull up your Log window to see if there were any errors during the run; your output appears in the Output window...a compact view can be gotten via clicking on Edit-Options-Page; see your code again - click on Run-Recall text in the editor window; save your file - click on File-Save As and if you created a sas directory, type sas and to get there, now give your file a name and click OK; Open a saved file - click on File-Open USING SAS on Unix in CC2 FOR CONFOUNDED AND ALIASED DESIGNS sta5205 Hoffman 4/9/03 Do the following exercises and answer the queries as you go along. Turn this in to me today. 1.a) Open the ‘template for presentation’ on my http://pegasus.cc.ucf.edu/~hoffman/sta5205.html website. Is there any other questions you would like me to put on the template? ___________________________________________________________ ____________________________________ b) Open ‘final review’ on my http://pegasus.cc.ucf.edu/~hoffman/sta5205.html website. 2. Copy the confounding program into your editor window from the website. Run this program and view the output. Recall the bead stringing experiment. Let Factor A be size: small or large; let B be color: black or orange; let C be music: No or Yes; let D be lighting: Low or High; let E be work area: cramped or spacious; let F be texture of the work surface: slick or pebbley. a) Look at observation 17. Circle which levels of the treatments are being applied to this experimental unit: small or large; black or orange; No or Yes; Low or High; cramped or spacious; slick or pebbley b) Compute how many effects there are in the full factorial design? ___________ c) If we decide also to have 4 blocks the how many total degrees of freedom are needed to check out block effects and factorial effects (assume no interaction between blocks and factors)?_____________ d) This output creates blocks where we confound abc and abd; and which other effect? ___________ e) If we had chosen to confound acf and def then which other effect would also be confounded? __________ f) currently, observation 17 is in the 0,0 block. under the design in e) which block would it be in? _________ g) Let us change the design now to be one with just 2 blocks. We want to confound the highest order interaction A*B*C*D*E*F with the blocks. Do this by altering the BLOCK1= statement to read: BLOCK1=mod(a+b+c+d+e+f,2); delete the BLOCK2 statement and rerun the program. h) which block is observation 17 in now? _______ i) write out the 32 interaction contrast coefficients corresponding to block 0 by multiplying the A,B,C,D,E,F columns (or observing the number of zeros in the row -- an even number will give a 1 product and an odd will yield -1). Do they all have the same value? What is that value? ______ j) Is the same contrast used to compare blocks as to calculate the highest order interaction? Yes or No 3. We will continue using this 2**6 experiment. But instead of caring about blocking let us use it as a technique to secure a 1/2 - replicate by using only the factor-level combinations defined by BLOCK 1 above (in the new modified program). a) We will be doing a 2 ** (6-1) design. We have how many effects to estimate? ________ but now with how many total degrees of freedom? _________ b) What is the defining relation? ________________________ c) What order interaction gets aliased to the main effects? ________ 4. You will want to begin looking at the data you have collected for your own experiments. Let us check some assumptions first. Copy in ‘start on your data’ program. Note that it is set up as a 2-way complete design with blocking (no block*treatment effect assumed). Tailor this as needed. if the data you are entering was collected in the order you have typed it in then add the order column which is just ‘ 1 2 3 4 ....’ a) Enter your data and alter the model to be your model. Which model are you using? ___________________ b) run the program; does there appear to be any pattern to the response/order plot? Yes or No if you had answered Yes, what would that mean? ________________ _________________________________ c) from the plot of response/treatment answer these: what is the range of the responses for the first level of treatment1? _____ and for the second level of treatment1? __________ and for the third level of treatment1? -____________ and for the fourth level of treatment1? ___________ Answer if applicable: what is the range of the responses for the first level of treatment2? _____ and for the second level of treatment2? __________ and for the third level of treatment2? -____________ and for the fourth level of treatment2? ________________ So, does there appear to be a reason to calculate the variances within each treatment and check whether the big to the small ratio exceeds 3? Yes or No d) if you had had a concern about the variance what technique is required to continue with the ANOVA procedure? _______________ e) check your z*nscore plot. Does your data lie on a (or pretty close to a) straight line? Yes or No. If it did not what would that say about your normality assumption -- Is it valid or invalid?