Skip to content

plotting of predictions fails if no predictors (e.g., intercept only models) #609

Description

@DominiqueMakowski
m <- lm(qsec ~ 1, data = mtcars)

modelbased::estimate_prediction(m) |> 
  plot()
#> Error: No `by` variable was detected, so nothing to put in the x-axis.

Created on 2026-04-08 with reprex v2.1.1

Not sure what's the best solution here:

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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