plot_effects,ubmsFit-method {ubms} | R Documentation |
Plot Marginal Effects of Covariates
Description
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.
Usage
## S4 method for signature 'ubmsFit'
plot_effects(
object,
submodel,
covariate = NULL,
level = 0.95,
draws = 1000,
smooth = NULL,
...
)
## S4 method for signature 'ubmsFit'
plot_marginal(
object,
submodel,
covariate = NULL,
level = 0.95,
draws = 1000,
smooth = NULL,
...
)
Arguments
object |
A fitted model of class |
submodel |
Submodel to get plots for, for example |
covariate |
Plot a specific covariate; provide the name as a string |
level |
Probability mass to include in the uncertainty interval |
draws |
Number of draws from the posterior to use when generating the
plots. If fewer than |
smooth |
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 |
... |
Currently ignored |
Value
A ggplot
if a single covariate is plotted, or an object
of class grob
if there are multiple covariates/panels