BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
syd1717
Fluorite | Level 6

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.

q.jpgq1.jpg

 

 

 

 

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
ChrisHemedinger
Community Manager

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.

Learn from the Experts! Check out the huge catalog of free sessions in the Ask the Expert webinar series.

View solution in original post

11 REPLIES 11
ChrisHemedinger
Community Manager

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.

Learn from the Experts! Check out the huge catalog of free sessions in the Ask the Expert webinar series.
syd1717
Fluorite | Level 6

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."

PaigeMiller
Diamond | Level 26

Some people would consider ANOVA to be a "regression approach". Other people might not consider ANOVA to be a "regression approach".

--
Paige Miller
ChrisHemedinger
Community Manager

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.

Learn from the Experts! Check out the huge catalog of free sessions in the Ask the Expert webinar series.
PaigeMiller
Diamond | Level 26

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.

--
Paige Miller
ChrisHemedinger
Community Manager

My fault @PaigeMiller - I copied these from the OP's attached PDF to place them inline.  I've tried again and made them larger.

Learn from the Experts! Check out the huge catalog of free sessions in the Ask the Expert webinar series.
PaigeMiller
Diamond | Level 26

Can't text in PDF be enlarged without that fuzziness? I know I could do that in PDF files that I view.

--
Paige Miller
ChrisHemedinger
Community Manager
Alas, this PDF was actually just images of the original problems -- not native text.
Learn from the Experts! Check out the huge catalog of free sessions in the Ask the Expert webinar series.
syd1717
Fluorite | Level 6

Hi thank you!

 

Is this any better?

PaigeMiller
Diamond | Level 26

@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.

--
Paige Miller
syd1717
Fluorite | Level 6

I really hope this is better, sorry guys.

SAS Innovate 2025: Save the Date

 SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!

Save the date!

Mastering the WHERE Clause in PROC SQL

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.

Discussion stats
  • 11 replies
  • 3104 views
  • 2 likes
  • 3 in conversation