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.
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;
All variables in the model statement need to be numeric. Try setting a new gender variable to, say, 0 for female and 1 for male.
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.
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!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.