Skip to content

consider making geom_smooth() formula = "auto" the default #3205

Closed
@behrman

Description

@behrman

In observing the code of my students, I can see that many have mental models of geom_smooth() that lead them to use it incorrectly. Their mental model is to use the method argument to specify the type of smoothing, and this is reasonable. It works fine for method = "lm" and method = "loess" but not method = "gam", since the default formula works well with "lm" and "loess" but not "gam". Why not have the default formula be "auto", which would look at the specified method and use y ~ x for "lm" and "loess" and y ~ s(x, bs = "cs") for "gam".

I realize that the formula used by method = "auto" for "gam" is explained in the third paragraph of the help entry for the method argument, but in practice this is not connecting with a large proportion of the users I'm seeing.

@skaltman

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions