if (FALSE) {
# using the example data from Anderson et al. 2010 and fitting the default model
# (note that the model can take a while to fit)
fit <- RoBMA(r = Anderson2010$r, n = Anderson2010$n, study_names = Anderson2010$labels)
### ggplot2 version of all of the plots can be obtained by adding 'model_type = "ggplot"
# the 'plot' function allows to visualize the results of a fitted RoBMA object, for example;
# the model-averaged effect size estimate
plot(fit, parameter = "mu")
# and show both the prior and posterior distribution
plot(fit, parameter = "mu", prior = TRUE)
# conditional plots can by obtained by specifying
plot(fit, parameter = "mu", conditional = TRUE)
# plotting function also allows to visualize the weight function
plot(fit, parameter = "weightfunction")
# re-scale the x-axis
plot(fit, parameter = "weightfunction", rescale_x = TRUE)
# or visualize the PET-PEESE regression line
plot(fit, parameter = "PET-PEESE")
}
Run the code above in your browser using DataLab