BookmarkSubscribeRSS Feed
glee217
Calcite | Level 5

I'd like to test hypothesis, where the difference between genders regards to writing ability.

My hypothesis is that females would have higher score than males.캡처.JPG

 

And i was going to use 'proc glm' or 'proc reg' to test about it but the error says:

ERROR: Variable gender in list does not match type prescribed for this list.

 

So is it meaning that i can't use categorical variables to test hypothesis?

 

Here is my code:

proc reg data=temp;
model write = gender;
run;

 

2 REPLIES 2
Rick_SAS
SAS Super FREQ

Just add gender as a class variable and use PROC GLM:

 

proc glm data=temp;
class gender;
model write = gender;
run;

 

 If your primary purpose is to conduct a t test for the difference of means, you can use PROC TTEST, which supports one- or two-sides tests of hypothesis. See the Getting Started example for PROC TTEST.

SAS Innovate 2025: Call for Content

Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!

Submit your idea!

What is ANOVA?

ANOVA, or Analysis Of Variance, is used to compare the averages or means of two or more populations to better understand how they differ. Watch this tutorial for more.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 2 replies
  • 1457 views
  • 0 likes
  • 3 in conversation