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.

Ready to join fellow brilliant minds for the SAS Hackathon?

Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.

Register today!
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
  • 1386 views
  • 0 likes
  • 3 in conversation