11.07.2015 Views

statisticalrethinkin..

statisticalrethinkin..

statisticalrethinkin..

SHOW MORE
SHOW LESS
  • No tags were found...

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

5.4. CATEGORICAL VARIABLES 1635.4.2. Many categories. Binary categories are easy, because you only need one dummy variable.You just pick one of the categories to be indicated by the dummy. e other categoryis then measured by the intercept, α.But when there are more than two categories, you’ll need more than one dummy variable.Here’s the general rule:To include k categories in a linear model, you require k−1 dummy variables.Each dummy variable indicates, with the value 1, a unique category. e category with nodummy variable assigned to it ends up again as the “intercept” category.Let’s explore an example using the primate milk data again. We’re interested now in theclade variable, which encodes the broad taxonomic membership of each species:data(milk)d

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!