Newbie at SAS, I did as
proc freq data=want;
tables earnings*gender / chisq;
run;
but I doubt it's right because I went to google the methods
to analyze its results?
Thank you.
Hi @lolol0101,
my advise would be not to start with test but with (graphical) analysis of the data. For example the frequency distribution of earnings, one per gender. Comparing the distributions might give some ideas about a hypothesis that than can be tested.
So, do you want to show us graphs of the frequency distributions?
Best
Markus
Then try ANOVA .
proc glm data=have;
class gender;
model salary=gender /solution;
lsmean gender/diff pdiff adjust=dutt;
quit;
The better way is non-parameter version of ANOVA as Paige said.
or you could try GAMMA distribution since your salary is all positive.
proc genmod data=have;
class gender;
model salary=gender/dist=gamma;
lsmean gender/diff pdiff adjust=dutt;
run;
Thank you! last question, what if it's "salary" vs. "age"? (both are numeric)
How does one examine this?
@lolol0101 wrote:
Thank you! last question, what if it's "salary" vs. "age"? (both are numeric)
How does one examine this?
@lolol0101 wrote:
Newbie at SAS, I did as
proc freq data=want;
tables earnings*gender / chisq;
run;
but I doubt it's right because I went to google the methods
to analyze its results?
I would say use the Kruskal-Wallis test in PROC NPAR1WAY, which uses the Wilcoxon scores. Example.
This is the non-parametric equivalent of a one-way ANOVA. A chi-squared test is not really appropriate for the (almost) continuous variable earnings.
It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.