Generates marginal fixed effects plots of one or more covariates from a
ubmsFit
submodel. For each plot, the focal covariate is allowed to
vary across its range (or possible discrete values, for a factor), while
the other covariates are held at their medians or reference levels.
Random effects are ignored.
# S4 method for class 'ubmsFit'
plot_effects(
object,
submodel,
covariate = NULL,
level = 0.95,
draws = 1000,
smooth = NULL,
...
)
# S4 method for class 'ubmsFit'
plot_marginal(
object,
submodel,
covariate = NULL,
level = 0.95,
draws = 1000,
smooth = NULL,
...
)
A fitted model of class ubmsFit
Submodel to get plots for, for example "det"
Plot a specific covariate; provide the name as a string
Probability mass to include in the uncertainty interval
Number of draws from the posterior to use when generating the
plots. If fewer than draws
are available, they are all used
Smoother span (f) value used for LOWESS smoothing of the
upper and lower credible interval bounds for a continuous covariate.
No smoothing is done if NULL
. A reasonable value to try is 0.05.
The larger the value, the smoother the curve. As with all smoothing, use
with caution
Currently ignored
A ggplot
if a single covariate is plotted, or an object
of class grob
if there are multiple covariates/panels