if (FALSE) {
# using the example data from Darwin
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)
)
### ggplot2 version of all of the plots can be obtained by adding 'model_type = "ggplot"
# diagnostics function allows to visualize diagnostics of a fitted RoBTT object, for example,
# the trace plot for the mean parameter in each model model
diagnostics(fit, parameter = "delta", type = "chain")
# in order to show the trace plot only for the 11th model, add show_models parameter
diagnostics(fit, parameter = "delta", type = "chain", show_models = 11)
# furthermore, the autocorrelations
diagnostics(fit, parameter = "delta", type = "autocorrelation")
# and overlying densities for each plot can also be visualize
diagnostics(fit, parameter = "delta", type = "densities")
}
Run the code above in your browser using DataLab