USING SAS on Unix in CC2 FOR BLOCKED DESIGNS sta5205 Hoffman 3/31/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 up arrow from left) o click on Applications--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 ch. 10 #6 (candle) data from voss data site and programs from this site. - Opening SAS o click on the tools drawer & the Desktop & on Terminal o type 'telnet olympus' at > prompt and re-login; then type SAS - Using SAS o you can type code into the editor window or copy it in. o copy code: click on the prog6.sas program 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 Local-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 Local-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 Recall the in-class data on S,M,L,XL sized beads and 4 time-of-day (M-am, M-pm, T-am, T-pm): SIZE 1 2 3 4 TOD 1 60 50 40 2 65 54 35 3 58 38 31 4 52 44 33 You need this for question 3 below. USING SAS on Unix in CC2 FOR BLOCKED DESIGNS sta5205 Hoffman 3/31/03 Do the following exercises and answer the queries as you go along. Turn this in to me today. Also, return your reworked (as necessary) experiment proposals to me. 1. Read the chapter 10 #6 candle experiment problem in the Dean and Voss text. They want you to run a block-treatment (person-color) model and check for interaction. This is part of your homework assignment. My concern is about their claim that the four observations per person/color were collected in a "random order". a) Copy your candle data into your editor window (see page 1 for instructions). For Tom and the red colored candles, what was the time sequence of collection? 989 seconds was collected (circle one): first, second, third, fourth. 1032 seconds was collected (circle one): first, second, third, fourth. 1077 seconds was collected (circle one): first, second, third, fourth. 1019 seconds was collected (circle one): first, second, third, fourth. b) Copy in from my website prog6.sas. Delete first line of code through semi-colon before 'proc glm' (put dd on first line and on last and hit enter). Delete 'means' code line through 'estimate'. Include your candle data. Also add this line of code before your 'LINES': order= mod((_n_ - 1),4)+1; Also add this line of code before your 'proc glm': proc print; Update the beads words to candle words. Include order as another class along with block and color. Submit a run. Examine your output window. What did that first line of code do to your dataset?________________ Was there an effect due to the order? Yes or No What is the p-value you are looking at? _________ 2. Read the chapter 11 #11 beef experiment in the Dean and Voss text. Can this be a balanced incomplete block design? I. Is it binary? Yes or No II. Pairs show up equally? How many times? ____ a) does vr=bk? Show it: _____________ b) does r(k-1)=lambda*(v-1)? Show it: _______________ c) Is b>= v? Yes or No Let us use a SAS program to give us the pairings within each block. Save or Clear your editor window and copy in from my website the Incomplete block design program. Change the program so that block=15 (the requisite XV shown in the text) and tmt=6 (the value of v) and n=bk, the total sample size you will capture. Now run the program. Does it give you the same design (except for possibly a different r randomized order for the blocks)? Yes or No How many ways can you choose 2 items from 6? ________ and do we generate each of those possibilities? Yes or No so lambda = ________. 3. Introduce yourself to SAS-ASSIST. in the editor window click on toolbar global and then on sas-assist. when fancy panel (screen) comes up click on the data analysis button. now click on the anova button. note: to quit sas-assist keep clicking the goback button until you reach a fancy panel (screen) where there is an exit button to click. double click on the analysis...of..variance selection. click on the active-dataset button and then on create and on enter data interactively, then tabular-form; OK; make up a name for your dataset (the beads on page 1 of this handout) and merely enter SIZE and TOD and TIME as the names of the data; then click on View and End; a listing will pop up in order for you to enter data. key-in, tab to move, enter to record data. make a mistake? place your cursor on the observation number, then click toolbar edit and update. enter the change anywhere in the variable field and hit your enter(return) key. then click on toolbar's File and Save . Now click on toolbar's File and End to return to the ANOVA analysis. Click Goback button. You are ready to start your analysis. Click the dependent button. click on TIME and OK. Then click the classifications button and click on SIZE and TOD and then OK. Click the additional options buttons and go through each of your option availabilities entering what you need to do this balanced incomplete block inquiry: model e ffects? just run a block-treatment without interaction, that is, we just need to enter the SIZE and TOD main effects; model options? we know we need Type III estimates and sums of squares; analysis type? allows you to tell SAS if you have collected several repeated measurements on the same experimental unit -- we did not; model hypothesis? contrast? let us look at the XL (4) bead size versus the average of the rest. that is only 1 SIZE effect which you can make up a name for (like XL_V_REST) with contrast values of 1 1 1 -3; output statistics? due to the unequal sample sizes we must look at least-squares means. once you goback you are ready to run your analysis. click Local on the toolbar and click Run. LOOK AT THE LOG window. SAS has created the code for you -- of course, you needed to know about using Type III SS and how to build the contrasts, i.e. you need to be a statistician, but perhaps you need not be a programmer! a) Write here the line of code which did the comparison between the XL and average of the other beads: ____________________________________________________________ check out the Output window. It is the same results we saw in class. b) Is there a difference between the average time to string XL beads and the average to string an equal mix of the rest? Yes or No . What is the p-value you are looking at to decide this? ________________________________ click on toolbar File and End, goback and exit to quit SAS-ASSIST