Code Monkey home page Code Monkey logo

Comments (2)

rudeboybert avatar rudeboybert commented on July 29, 2024

That was an editorial decision on our part. On the one hand, we'd love to be able to include situations like this one, but on the other (as you suggest about the digression) once we try to start including everything, soon we'll end up with nothing. It's a tough balancing act. Also, in our opinions the reordering of factors is more of a topic for a straight data science course, and not so much a course on statistical inference that uses data science.

However, as you suggest, it might be worth at least point readers in the right direction, without entirely opening the can of worms that is categorical/factors.

from moderndive_book.

rudeboybert avatar rudeboybert commented on July 29, 2024

Hi @oscci, thanks for this suggestion. We just addressed it in d7dc2ab

Specifically in Section 6.2.2 Linear regression on linear regression with a categorical variable we amended the text to read:

You might be asking at this point why was Africa chosen as the "baseline for comparison" group. For no other reason than it comes first alphabetically of the five continents; by default R arranges factors/categorical variables in alphanumeric order. However you can change this baseline group to be another continent if you manipulate the variable continent's factor "levels" using the forcats package. See Chapter 15 of Garrett Grolemund and Hadley Wickham's book for examples.

from moderndive_book.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.