plot.RoBTT | R Documentation |
plot.RoBTT
allows to visualize
different "RoBTT"
object parameters in various
ways. See type
for the different model types.
## S3 method for class 'RoBTT'
plot(
x,
parameter = "mu",
transform_rho = FALSE,
conditional = FALSE,
plot_type = "base",
prior = FALSE,
dots_prior = NULL,
...
)
x |
a fitted 'RoBTT' object |
parameter |
a parameter to be plotted. Defaults to
|
transform_rho |
whether rho parameter should be translated into log standard deviation ratio |
conditional |
whether conditional estimates should be
plotted. Defaults to |
plot_type |
whether to use a base plot |
prior |
whether prior distribution should be added to
figure. Defaults to |
dots_prior |
list of additional graphical arguments
to be passed to the plotting function of the prior
distribution. Supported arguments are |
... |
list of additional graphical arguments
to be passed to the plotting function. Supported arguments
are |
plot.RoBTT
returns either NULL
if plot_type = "base"
or an object object of class 'ggplot2' if plot_type = "ggplot2"
.
RoBTT()
## Not run:
data("fertilization", package = "RoBTT")
fit <- RoBTT(
x1 = fertilization$Self,
x2 = fertilization$Crossed,
prior_delta = prior("cauchy", list(0, 1/sqrt(2))),
prior_rho = prior("beta", list(3, 3)),
seed = 1,
chains = 1,
warmup = 1000,
iter = 2000,
control = set_control(adapt_delta = 0.95)
)
# plot the model-averaged effect size estimate
plot(fit, parameter = "delta")
# plot prior and posterior of the conditional effect size estimate
plot(fit, parameter = "delta", conditional = TRUE, prior = TRUE)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.