Skip to content

Lesson10 - Difference between the OLS results and sns.lmplot graph #745

@wz2000xx

Description

@wz2000xx

Hi,

In lesson 10, we fitted the relationship between child mortality and children per woman and income group, and get the following results.

Screenshot 2023-11-19 at 19 29 14

In my understanding, for example, for the Lower-middle income group, the intercept should be -22.8577 + 15.7559 = -7.1018, however, the graph created using sns.lmplot shows an intercept of around 6 for that income group as shown below.

Screenshot 2023-11-19 at 19 32 06

I don't understand why this is the case. This problem also exists for other income groups and categorical variables, such as species in the iris dataset.

Thank you very much!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions