Description Usage Arguments Value Examples
Function to plot parameter posteriors from Zero-inflated Beta Regressions
1 2 |
obj |
model object from |
iter |
integer. The number of iterations. |
variable_names |
character vector of variable names. Must be in the
same order and the same length as variables enterd into the |
xlab |
character string x-axis label. |
title |
character string title for the plot |
a ggplot2 plot
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 | ## Not run:
Load packages
library(zoib)
library(zibHelpers)
# Run example of clustered zero-inflated beta regression from
# Liu and Kong (under review, 12-14)
# Load data
data("AlcoholUse", package = "zoib")
AlcoholUse$Grade <- as.factor(AlcoholUse$Grade)
nIter = 50 # Number of iterations, including burn-in
# Estimate
Out <- zoib(Percentage ~ Grade + Days + Gender|1|Grade + Days + Gender|1,
data = AlcoholUse, random = 1, EUID = AlcoholUse$County,
zero.inflation = TRUE, one.inflation = FALSE, joint = FALSE,
n.iter = nIter)
# Plot the posterior summary
zibPlot(Out, iter = nIter)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.