You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In some fields, regression lines on point plots are only added when a regression coefficient is significant. In those cases it would be great to have a way to still plot the residuals (with show_residuals=TRUE), turn off the confidence interval (show_ci=FALSE), and also disable plotting the regression line itself (so show_regressionline/show_line or something along those lines).
I've tried to get to the residuals myself (also mentioned in #627) which would allow me to make a plot myself, but have not been successful until now.
Have found a temporary solution, which is to set the layer to NULL:
library(ggeffects)
data("mtcars")
lm_c<- lm(hp~wt+vs, data=mtcars)
c_pred<- predict_response(lm_c, "wt")
p_c<- plot(c_pred, show_residuals=TRUE, show_ci=FALSE)
#> Data points may overlap. Use the `jitter` argument to add some amount of#> random variation to the location of data points and avoid overplotting.p_c$layers[[2]] <-NULLp_c
In some fields, regression lines on point plots are only added when a regression coefficient is significant. In those cases it would be great to have a way to still plot the residuals (with
show_residuals=TRUE
), turn off the confidence interval (show_ci=FALSE
), and also disable plotting the regression line itself (soshow_regressionline
/show_line
or something along those lines).I've tried to get to the residuals myself (also mentioned in #627) which would allow me to make a plot myself, but have not been successful until now.
Have found a temporary solution, which is to set the layer to
NULL
:Created on 2025-01-18 with reprex v2.1.1
The text was updated successfully, but these errors were encountered: