Hi everyone. I have been trying to learn SAS, but I am struggling and these are two practice questions that I need help setting up. If anyone could give me some pointers, that would be so great. Thank you! The problems are about variation, residuals, and noise. I am using the student version of SAS.
I am comfortable with solving problems like this by hand, but when it comes to using a computer, I cannot seem to get it right.
The questions are below.
I think both of these are ANOVA problems (thought the "use the regression method" directive in the 2nd question might throw you off -- not sure on that). In SAS, the GLM procedure is often used for this.
Your first task will be to get the data into SAS. Despite the data layout in the tables (esp the first one), you'll probably want the data to have a grouping (category) variable and then the measure. Ex:
batch value 1 23.46 1 22.69 1 23.39 /* more values */ 2 23.59 2 23.46 /* etc. */
If you're using SAS University Edition or SAS OnDemand for Academics, the One-Way ANOVA task might help you get started with the code. Or scan through the examples in the PROC GLM documentation, like this one.
I think both of these are ANOVA problems (thought the "use the regression method" directive in the 2nd question might throw you off -- not sure on that). In SAS, the GLM procedure is often used for this.
Your first task will be to get the data into SAS. Despite the data layout in the tables (esp the first one), you'll probably want the data to have a grouping (category) variable and then the measure. Ex:
batch value 1 23.46 1 22.69 1 23.39 /* more values */ 2 23.59 2 23.46 /* etc. */
If you're using SAS University Edition or SAS OnDemand for Academics, the One-Way ANOVA task might help you get started with the code. Or scan through the examples in the PROC GLM documentation, like this one.
Thank you for sharing the video, that was so helpful! I also think I inputted the data correctly. I used the ANOVA test with the same settings both times and alpha 0.05. Does that seem right to you? I am a little confused as to if I have to do something different with Q2 because it wants a "regression approach" and Q1 is asking about "batch to batch."
Some people would consider ANOVA to be a "regression approach". Other people might not consider ANOVA to be a "regression approach".
I'm going to admit that I googled the text of the questions and found them within various course exercises (not necessarily SAS). All supplied solutions (which didn't include code, just methodology) used ANOVA, so I think using ANOVA is the expected answer here.
I would normally use PROC GLM for this type of analysis. Question 1(b) seems to want the within batch variation and the batch-to-batch variation, which is an output from PROC GLM, the within batch variation is the mean square for error and the batch-to-batch variation is the mean square for model.
@syd1717 , I'm sorry to be so picky, but could you edit your original post so that the text of the questions is LARGER? Right now, the text is barely readable to me.
My fault @PaigeMiller - I copied these from the OP's attached PDF to place them inline. I've tried again and made them larger.
Can't text in PDF be enlarged without that fuzziness? I know I could do that in PDF files that I view.
Hi thank you!
Is this any better?
@syd1717 I (and many others) never download attachments. If you can screen capture the items (at a readable size), include them in your message by clicking on the camera icon.
I really hope this is better, sorry guys.
SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!
SAS' Charu Shankar shares her PROC SQL expertise by showing you how to master the WHERE clause using real winter weather data.
Find more tutorials on the SAS Users YouTube channel.