Conversation
|
Could we instead make this a |
|
Sure, but do we need |
|
It can still be useful for power-users to have a way to pass the data no? |
|
@gemini-code-assist review |
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
|
This is the current state - though I'm not sure how to fix the last error, and I don't understand why ggplot complains about discrete values? |
library(modelbased)
model <- lm(Sepal.Length ~ Species * Sepal.Width, data = iris)
pr <- estimate_means(model, c("Sepal.Width", "Species"))
plot(pr, show_residuals = TRUE)set.seed(1234)
x1 <- rnorm(200)
x2 <- rnorm(200)
# quadratic relationship
y <- 2 * x1 + x1^2 + 4 * x2 + rnorm(200)
d <- data.frame(x1, x2, y)
model <- lm(y ~ x1 + x2, data = d)
pr <- estimate_means(model, "x1")
plot(pr, show_residuals = TRUE)model <- lm(y ~ x1 + x2, data = d)
pr <- estimate_means(model, c("x1", "x2=[sd]"))
plot(pr, show_residuals = TRUE)
#> Error in `scale_colour_continuous()`:
#> ! Discrete value supplied to a continuous scale.
#> ℹ Example values: -0.93, 0.07, and 1.08.Created on 2025-08-16 with reprex v2.1.1 |
I'm not quite sure at which point we should / can add |
|
Is there a way to get a table of partial residuals as easily as it is done here for plotting? |
|
Yes, should be |
|
Thanks!!!
…On Tue, Oct 14, 2025 at 1:28 PM Daniel ***@***.***> wrote:
*strengejacke* left a comment (easystats/modelbased#386)
<#386 (comment)>
Yes, should be residualize_over_grid().
—
Reply to this email directly, view it on GitHub
<#386 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAABRR5E5SGIV6W2SHJVHFD3XUXFDAVCNFSM6AAAAABWZE34GOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZTIMBSHEZDCNRRGQ>
.
You are receiving this because you commented.Message ID:
***@***.***>
|


Fixes #129