I am writing a report looking at human sexual selection and how there is a difference in the preferred age of potential mate between sexes. I collected 104 lonely hearts advertisements and organised the data by grouping them into gender, age of person placing the advert (I have placed them in categories) and preferred age of potential mate (calculated median from a range).

The data distribution was abnormal so I went ahead and performed a Kruskal-Wallis ANOVA between gender and median potential mate. I then wanted to strengthen the analysis by looking at the interaction of gender and age of person placing the advert on the preferred age of potential mate.

The problem I had was that Kruskal-Wallis will not allow more than one grouping variable. To circumvent this, I attached a gender to each age category, essentially having two Independent factors in one column (attached picture may make this clearer).

I can do a pairwise comparison of each case is it ok to group two factors in this way?

Or would it be better to rearrange the data completely and do a different tests?



The Kruskal-Wallis test is like nonparametric one-way ANOVA. So only one group variable is allowed. Per the screenshot of your data sample, you can create a new categorical variable which denotes the different combination of Gender and Agegroups. Then you can run the Kruskal-Wallis test by specifying this new variable as the grouping variable.

Alternatively, you may consider to transform the MedianAgeMate variable using log for instance, and make it "normal." Then you can run the two-way ANOVA model (General Linear Model -> Univaraite) on your transformed data. Using this procedure, you can build your own model through controlling the main effects and the interaction term if you want.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.