USING SAS on Unix in CC2 FOR RESIDUAL ANALYSIS AND 2 FACTOR DESIGNS sta5205 Hoffman 2/10/03 Please note that the chapter 6 HW is still #2, #7 but since we have not gotten to 2-way complete models do #8 in the following manner: omit the data for i=3, the third gage setting row and only conduct a 2-way additive model analysis. - 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. Y ou 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 on a 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 tab 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 progX.sas programs from there - Opening SAS o click on the tools drawer & the Desktop & on Terminal o 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 prog2.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) d eletes a line; an 'i' inserts one. you may type on new lines as usual o to execute the SAS code, Submit it; pull up your Log window t o 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; s ee your code again - click on 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 s aved file - click on File-Open USING SAS on Unix in CC2 FOR RESIDUAL ANALYSIS AND 2 FACTOR DESIGNS sta5205 Hoffman 2/10/03 Do the following exercises and answer the queries as you go along. Turn this in to me today. 1. Run prog3.sas to plot ln(s(i)**2) versus ln(y-bar). If the plot is a definite line then the h(y) transform for the data is y**(1 - (slope/2)). Approximately what is the slope of the line? Answer: ________ 2. Run prog2.sas to conduct a residual analysis. Which plot makes you think an assumption might be violated? Answer: The Plot with X=______ (label) and Y=________ (label) 3. Get prog2.sas again and do your own residual analysis but transform a all your data by entering a line of code right after the INPUT line which reads: htime=log10(tan((time*3.141596/180)/2) - .3); Is there less violation of assumptions now? Answer: Yes or No. 4. Run prog4.sas to see what the 2 factor data looks like. What does the letcode 'ma' represent? Answer: __________________________________________ 5. Run prog5.sas which is the means plots done to get a visual feel for interaction. Might you believe interaction exists? Why? Answer: ___________________________________________ 6. Run prog6.sas despite the worry of interaction. This is the 2-way additive model. a) If we believe the model is correct then which of these factors are important when it comes to stringing beads? Answer: BEAD-SIZE and/or FINGER-LENGTH b) Are the Type I and Type III SS the same? Answer: Yes or No c) Are the Bonferroni comparisons of the means the same for MEAN and LSMEAN? Ansr: Yes or No d) what is the value of SSE (sum of squares for error)? Answer: ____________ 7. Add one observation to the end of your data set in prog6.sas: L 3 B 78 3 44 Rerun the prog6.sas and answer: a) If we believe the model is correct then which of these factors are important when it comes to stringing beads? Answer: BEAD-SIZE and/or FINGER-LENGTH b) Are the Type I and Type III SS the same? Answer: Yes or No c) Are the Bonferroni comparisons of the means the same for MEAN and LSMEAN? Ansr: Yes or No 8. Run prog7.sas. This is the "orthogonal trick" for the one observation per cell trouble. I use 2 of the interaction degrees of freedom to compute SSE. What is the value of SSE:_________ Which contrast is significant? ___________ 9. Rerun prog7.sas changing the model statement to: MODEL HTIME=A1 A2 B1 B2; so that you use all the interaction for the SSE. What is the value of SSE now? __________ Is it equal to the SSE you got in problem 6. above? Answer: Yes or No. 10. Run prog8.sas which is the cell-means model (like a 1-way). Note that we added an additional 9 observations. How many pairwise comparisons are there? Answer: _______ Is there a signficant differences among the means? What is the p-value? _______ 11. Run prog9.sas which is the 2-way complete model. a) Which of these factors are important when it comes to stringing beads? Answer: BEAD-SIZE and/or FINGER-LENGTH and/or the INTERACTION b) Are the Type I and Type III SS the same? Answer: Yes or No c) Are the Scheffe comparisons of the means the same for MEAN and LSMEAN? Ans: Yes or No 12. Add one observation to the end of your data set in prog9.sas: L 3 B 78 3 44 Rerun the prog9.sas and answer: a) Which of these factors are important when it comes to stringing beads? Answer: BEAD-SIZE and/or FINGER-LENGTH and/or INTERACTION b) Are the Type I and Type III SS the same? Answer: Yes or No c) Are the Scheffe comparisons of the means the same for MEAN and LSMEAN? Ansr: Yes or No