% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/plot_moderation.R
\name{plot_moderation}
\alias{plot_moderation}
\title{Plot Moderation Effect}
\usage{
plot_moderation(object)
}
\arguments{
\item{object}{A fitted model}
}
\value{
A ggplot object
}
\description{
Produces a plot of the moderation effect.
}
\examples{
set.seed(123)

n <- 100
x <- rnorm(n)
z <- 0.5 * x + sqrt(1 - 0.5^2) * rnorm(n)

y <- 0.3 * x + 0.3 * z + 0.8 * x * z + rnorm(n)

data <- data.frame(x, z, y)

result <- moderated_regression(data, iv = "x", moderator = "z", dv = "y")

plot_moderation(result)

}
