br_show_fitted_line_2d {bregr} | R Documentation |
Show 2d fitted regression line with visreg
interface
Description
Similar to br_show_fitted_line()
, but visualize how two variables interact to affect the response in regression models.
Usage
br_show_fitted_line_2d(breg, idx = 1, ...)
Arguments
breg |
A regression object with results (must pass |
idx |
Length-1 vector. Index or name (focal variable) of the model.
This is different from |
... |
Arguments passing to |
Value
A plot
See Also
Other br_show:
br_show_fitted_line()
,
br_show_forest()
,
br_show_forest_ggstats()
,
br_show_forest_ggstatsplot()
,
br_show_risk_network()
,
br_show_table()
,
br_show_table_gt()
Examples
if (rlang::is_installed("visreg")) {
m <- br_pipeline(mtcars,
y = "mpg",
x = colnames(mtcars)[2:4],
x2 = "vs",
method = "gaussian"
)
br_show_fitted_line_2d(m, xvar = "cyl", yvar = "mpg")
}
[Package bregr version 1.0.0 Index]