View source: R/plot_egg_slopes.R
plot_egg_slopes | R Documentation |
egg_model()
.Plot derived slopes from a model fitted by egg_model()
.
plot_egg_slopes(
fit,
period = c(0, 0.5, 1.5, 3.5, 6.5, 10, 12, 17),
knots = c(1, 8, 12)
)
fit |
A model object from a statistical model
such as from a call to |
period |
The intervals knots on which slopes are to be computed. |
knots |
The knots as defined |
A patchwork
ggplot2
object.
library(ggplot2)
library(eggla)
data("bmigrowth")
res <- egg_model(
formula = log(bmi) ~ age,
data = bmigrowth[bmigrowth[["sex"]] == 0, ],
id_var = "ID",
random_complexity = 1
)
plot_egg_slopes(
fit = res,
period = c(0, 0.5, 1.5, 3.5, 6.5, 10, 12, 17)
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.