plot.clarify_adrf {clarify} | R Documentation |
Plot marginal predictions from sim_adrf()
Description
plot.clarify_adrf()
plots the output of sim_adrf()
. For the average dose-response function (ADRF, requested with contrast = "adrf"
in sim_adrf()
), this is a plot of the average marginal mean of the outcome against the requested values of the focal predictor; for the average marginal effects function (AMEF, requested with contrast = "amef"
in sim_adrf()
), this is a plot of the instantaneous average marginal effect of the focal predictor on the outcome against the requested values of the focal predictor.
Usage
## S3 method for class 'clarify_adrf'
plot(
x,
ci = TRUE,
level = 0.95,
method = "quantile",
baseline,
color = "black",
...
)
Arguments
x |
a |
ci |
|
level |
the confidence level desired. Default is .95 for 95% confidence intervals. |
method |
the method used to compute confidence bands. Can be |
baseline |
|
color |
the color of the line and confidence band in the plot. |
... |
for |
Details
These plots are produced using ggplot2::geom_line()
and ggplot2::geom_ribbon()
. The confidence bands should be interpreted pointwise (i.e., they do not account for simultaneous inference).
Value
A ggplot
object.
See Also
summary.clarify_est()
for computing p-values and confidence intervals for the estimated quantities.
Examples
## See help("sim_adrf") for examples