Skip to main content
replaced http://stats.stackexchange.com/ with https://stats.stackexchange.com/
Source Link

The second coding brings absolutely no information, since ismale is perfectly correlated to isfemale and always if first is true, then the second must be false. So introducing the second variable does nothing. In general, to encode $k$ categories, you need $k-1$ dummy variables, since if each of the $k-1$ dummies it false, then $k$'th "default" category must be true (assuming that your data represents something like single-choice questions, so the categories are exclusive and exactly one needs to be true).

See also related threads
Why is gender typically coded 0/1 rather than 1/2, for example?
Why 0 for failure and 1 for success in a Bernoulli distribution?Why 0 for failure and 1 for success in a Bernoulli distribution?

You may also be interested in reading the What is a contrast matrix?What is a contrast matrix? thread.

The second coding brings absolutely no information, since ismale is perfectly correlated to isfemale and always if first is true, then the second must be false. So introducing the second variable does nothing. In general, to encode $k$ categories, you need $k-1$ dummy variables, since if each of the $k-1$ dummies it false, then $k$'th "default" category must be true (assuming that your data represents something like single-choice questions, so the categories are exclusive and exactly one needs to be true).

See also related threads
Why is gender typically coded 0/1 rather than 1/2, for example?
Why 0 for failure and 1 for success in a Bernoulli distribution?

You may also be interested in reading the What is a contrast matrix? thread.

The second coding brings absolutely no information, since ismale is perfectly correlated to isfemale and always if first is true, then the second must be false. So introducing the second variable does nothing. In general, to encode $k$ categories, you need $k-1$ dummy variables, since if each of the $k-1$ dummies it false, then $k$'th "default" category must be true (assuming that your data represents something like single-choice questions, so the categories are exclusive and exactly one needs to be true).

See also related threads
Why is gender typically coded 0/1 rather than 1/2, for example?
Why 0 for failure and 1 for success in a Bernoulli distribution?

You may also be interested in reading the What is a contrast matrix? thread.

added 193 characters in body
Source Link
Tim
  • 141.2k
  • 26
  • 270
  • 512

The second coding brings absolutely no information, since ismale is perfectly correlated to isfemale and always if first is true, then the second must be false. So introducing the second variable does nothing. In general, to encode $k$ categories, you need $k-1$ dummy variables, since if each of the $k-1$ dummies it false, then $k$'th "default" category must be true (assuming that your data represents something like single-choice questions, so the categories are exclusive and exactly one needs to be true).

See also related threads
Why is gender typically coded 0/1 rather than 1/2, for example?
Why 0 for failure and 1 for success in a Bernoulli distribution?

You may also be interested in reading the What is a contrast matrix? thread.

The second coding brings absolutely no information, since ismale is perfectly correlated to isfemale and always if first is true, then the second must be false. So introducing the second variable does nothing. In general, to encode $k$ categories, you need $k-1$ dummy variables, since if each of the $k-1$ dummies it false, then $k$'th "default" category must be true (assuming that your data represents something like single-choice questions, so the categories are exclusive and exactly one needs to be true).

See also related threads
Why is gender typically coded 0/1 rather than 1/2, for example?
Why 0 for failure and 1 for success in a Bernoulli distribution?

The second coding brings absolutely no information, since ismale is perfectly correlated to isfemale and always if first is true, then the second must be false. So introducing the second variable does nothing. In general, to encode $k$ categories, you need $k-1$ dummy variables, since if each of the $k-1$ dummies it false, then $k$'th "default" category must be true (assuming that your data represents something like single-choice questions, so the categories are exclusive and exactly one needs to be true).

See also related threads
Why is gender typically coded 0/1 rather than 1/2, for example?
Why 0 for failure and 1 for success in a Bernoulli distribution?

You may also be interested in reading the What is a contrast matrix? thread.

Source Link
Tim
  • 141.2k
  • 26
  • 270
  • 512

The second coding brings absolutely no information, since ismale is perfectly correlated to isfemale and always if first is true, then the second must be false. So introducing the second variable does nothing. In general, to encode $k$ categories, you need $k-1$ dummy variables, since if each of the $k-1$ dummies it false, then $k$'th "default" category must be true (assuming that your data represents something like single-choice questions, so the categories are exclusive and exactly one needs to be true).

See also related threads
Why is gender typically coded 0/1 rather than 1/2, for example?
Why 0 for failure and 1 for success in a Bernoulli distribution?