1
$\begingroup$

I know this question is stupid, but it is really make me confused. If we have the gender variable, and then encode it as 0 (female) and 1 (male). Most people would say we should treat gender as nominal data, since male and female are not quantitative values.

However, what if we consider the number of Y chromosome? In general, male has one Y chromosome, and female has zero Y chromosome. The number of Y chromosome is the ordinal variable. Then, we can get the data like this,

observation   gender      #Y chromosome
  1           male (1)        1
  2           female(0)       0
  3           female (0)      0
  4           male (1)        1

In that case, is it okay that we treat gender (0,1) as ordinal variable?

$\endgroup$
5
  • 2
    $\begingroup$ What difference would it make? It is still a dichotomous variable. $\endgroup$ – Kuku Nov 2 '20 at 11:46
  • 1
    $\begingroup$ There is a question you don't ask of whether gender is a binary variable. But given that your data arrive as binary, what is then important is that binary variables are special in at least two senses. I'd say that (e.g.) rank correlations show that binary variables are ordinal in an extended sense: that is, the rank correlation between gender and some other variable is well defined apart from a convention about sign of correlation. Binary variables are only one step away from measurement insofar as taking the mean of a binary variable coded as 0 and 1 gets you a probability. $\endgroup$ – Nick Cox Nov 2 '20 at 11:46
  • $\begingroup$ But why you want to know is a fair comment in return. Binary variables are fine in regression-type models as responses or as predictors. The only other reason I can think for exploring this is a desire for some nonparametric test. $\endgroup$ – Nick Cox Nov 2 '20 at 11:48
  • 1
    $\begingroup$ You could also treat it as interval if you really want to use that system since there is only one interval and so every interval is equal to every other interval. But really you would be better to focus on what the variable actually is as @Kuku points out. $\endgroup$ – mdewey Nov 2 '20 at 11:48
  • 4
    $\begingroup$ The argument that gender is really counting chromosomes is tendentious, not least because you then get into a tangle over not having data on everyone's chromosomes, which can be more variable than XX or XY. . $\endgroup$ – Nick Cox Nov 2 '20 at 11:49
2
$\begingroup$

Since you have only two categories (M and F) then both the ordinal and nominal classification lead to 0 and 1 encoding so there is no difference. Whether you assign 0 to male or to female is just a matter of making the interpretation of the output easier so your decision based on Y chromosome is acceptable, I think.

$\endgroup$
2
  • $\begingroup$ But please note the problem that @NickCox raises in a comment: in reality, sex-chromosomal complements can go beyond just XX or XY. Your main point, that there is no difference between ordinal and nominal when there are only 2 categories, is of course correct. $\endgroup$ – EdM Nov 2 '20 at 15:52
  • $\begingroup$ @EdM it seems to me that the OP is bringing in the number of Ys only to justify sex as an ordinal variable. Such justification is not required since sex is binary but it can still make the encoding more intuitive. $\endgroup$ – dariober Nov 2 '20 at 21:12

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.